linking a sql field to point to the value of another sql fieldis it possible to create hyperlinks in powerbuilder such
that if you retrieve two fields from a database.. and want
to display the first field on the screen and have it link to
the value of the other field (when clicked) which is
actually a URL address, you can?
any help will be appreciated. thank you!
...
Variable Insert to SQL server insert satement setting values for the @variable INSIDE sql
ok, I am on Day 2 of being brain dead.I have a database with a table with 2 varchar(25) columns I have a btton click event that gets the value of the userName, and a text box.I NEED to insert a new row in a sql database, with the 2 variables.Ive used a sqldatasource object, and tried to midify the insert parameters, tried to set it at the button click event, and NOTHING is working. Anyone have a good source for sql 101/ASP.Net/Braindead where I can find this out, or better yet, give me an example. this is what I got <%@ Page Language="C#" %><!DOCTYPE html ...
FormView SQLDataSource Insert
FormView SQLDataSource Insert - How to pass parameter to Insert SQL field value
I am trying to pass value(s) to the Insert SQL. The id_company for example. These values come from Session Variables.
INSERT INTO dbo.SetupRoom(id_company, id_property, date_schedule,) VALUES (@id_company, @id_property, @date_schedule)
I tried to pass them in the Insert Parameters with default value but did not work:
<InsertParameters>
<asp:Parameter Type="Decimal" Name="id_company" DefaultValue="Session("IdCompany").ToString></asp:Parameter>
...
SQL Server insert query
When I am inserting into a table, I have some values which I am finding are "N/A" which obviously come from a source which allows it ie nvarchar column)
I need to check the values before entering into the column, and if it is not an integer, converting it to the value '00000000'
ie a similar thing would be isnull(columnname,00000000), but in this case, not checking for if it is null, but rather if it is an integer.
Does anyone have any ideas?
Take a look at http://berezniker.com/content/pages/sql/microsoft-sql-server/isnumericex-udf-data-type-awareBeware of ...
How do I get the Identity field value after a sql insert so the value can be included in the email sent upon submit?
I have a form that gathers a bunch of data, inserts into a sql database via a stored procedure, and then emails a user some details. How can I include the value of the unique identifier for the row just inserted into sql in the email? Here's my code behind.. and I don't know how/where to query the db to get the value and insert it...
Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
InsertConflictSearch.InsertParameters("SearchStatusID").DefaultValue = "1"InsertConflictSearch.Insert...
Insert SQL on Sql Command
i'm using an sql command for insert query
it looks like this
cmd=new sqlcommand("insert into tblname values('" & textbox1.text & "')",cn)
cmd.executereader
the problem is if i type a singlequote or double quote an error is throwing,invalid syntax ....
how can i s'rt out it with out using a sql stored procedure
thanks in advance
PrasantHI think therefore i'mvPras©
Hi,
try replacing the single quotes present in your input with double single quotes ... example below:
string sqlInput = textbox1.text.Replace("'","''...
HOW DO I: Insert nulls into SQL dateTime field stored in SQL DB from a web UI textbox
I’m looking for feedback on the Best/Right way to Insert nulls into SQL dateTime field in SQL DB from a web UI textbox.
Option 1: Presently implemented:
Dim dtFollowUpDate = IIf(dtDateFollowUp.Text = "", System.Data.SqlTypes.SqlDateTime.Null, dtDateFollowUp.Text)
Although ithis does what is needed it generates the following inner exception
ParamValue {System.Data.SqlTypes.SqlDateTime} Object[System.Data.SqlTypes.SqlDateTime] {System.Data.SqlTypes.SqlDateTime}  ...
Problem inserting sql query into database float datatype field using SQL Transaction
I have this problem of inserting my query into database field. My code is as of below.
The @AVERAGESCORE parameter is derived from
Dim averagescore As Single = (122 * 1 + 159 * 2 + 18 * 3 + 3 * 4 + 0 * 5) / (122 + 159 + 18 + 3 + 0)
and the value returned is (averagescore.toString("0.00"))
However, I have error inserting the averagescore variable into a field of datatype float during the transaction. I have no problems when using non transactional sql insert methods. What could be the problem?
Try
Dim i As Integer
...
Inserting values from textbox (string) into a sql numeric field
Dim MyCommand As SqlCommand
Dim InsertCmd As String =
"INSERT into artigianato (art_denominazione, art_phone) VALUES
(@art_denominazione, @art_phone)"
MyCommand = New SqlCommand(InsertCmd, MyConnection)
MyCommand.Parameters.Add(New SqlParameter("@art_denominazione", SqlDbType.VarChar))
MyCommand.Parameters("@art_denominazione").Value = denominazione.Text
MyCommand.Paramet...
How to insert dropdownlist selected value into sql DB table
Normal
0
false
false
false
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
...
select cheboxlist if any values are selected in sql
hello and thanks in advance,
I have a checkboxlist that is created dynamically from table1 once the records are inserted they are inserted in table2. i can save the values into the table and remove them if i uncheckd them that is working fine. the problem is to checked the items that have been selected already, how to i do this?? really really confuse...
here is the cs code; namespace IMS_2K9.Admin
{
public partial class Order_Charges : System.Web.UI.Page
{private string connectionString = WebConfigurationManager.ConnectionStrings["IMSCon...
Inserting a checkbox value into bit field sql server 2000
Edited by SomeNewKid. Please post code between <code> and </code> tags.
This is probaly the easiest question you've ever read but here goes.
I have a simple checkbox value that i want to insert into the database but whatever i do it does not seem to let me.
Here is my code:
Sub AddSection_Click(Sender As Object, e As EventArgs)
Dim myCommand As SqlCommand
Dim insertCmd As String
' Build a SQL INSERT statement string for all the input-form
' field values.
insertCmd = "insert into Customers values (@SectionName, ...
Select three fields in SQL datasource but only display two in datalist
How would I do this? I have to select the First and last name to show up in the datalist, but I also need to select the key because I am updating another column in the selected row. How would I display only the first and last name?
You can edit the html in the aspx page and remove that item from the templates.BrucePlease remember to click "Mark as Answer" on the posts that helped solve your issue.
The problem is the template doesnt know the name yet because the sql select is selecting from a "' + table + '" so that wouldnt work. Sorry I forgo...
Adding a default value to sql select parameters in vb.net
Hi,
I know it's easy to select the default value if you use the sql data source object to configure your query and feed it the select parameters. However, i will like to know if it's possible or what's is the syntax to add a default value to sql query being executed before page is post back. Below is what i have so far: the text strikethrought is the missing piece i need help making it the default value.Dim connect As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("Solution_DA_LiveConnectionString").ToString())
Dim sqlcom...