INSERT INTO and SELECT statements... pls help urgently
-
Hi I am developing a UserControl, I save this user control code to the database, which will be loaded dynamically to the Page. In my user control code consist of following lines: At this moment, I am manually puting this data to data base using "INSERT INTO" statement. But I get following error: Incorrect syntax near 'ProductID'. This is because single quotation mark around ProductID (field_product_id='ProductID'). If I change this single quotation to double quotation (e.g. field_id="ProductID") then this works okay. But in that scenario, SELECT statement fails while execution. Can anyone please let me know how can I achieve both successfully? Thanks in advance.
-
Hi I am developing a UserControl, I save this user control code to the database, which will be loaded dynamically to the Page. In my user control code consist of following lines: At this moment, I am manually puting this data to data base using "INSERT INTO" statement. But I get following error: Incorrect syntax near 'ProductID'. This is because single quotation mark around ProductID (field_product_id='ProductID'). If I change this single quotation to double quotation (e.g. field_id="ProductID") then this works okay. But in that scenario, SELECT statement fails while execution. Can anyone please let me know how can I achieve both successfully? Thanks in advance.
How about SelectCommand="SELECT field_defaultvalue FROM cp_productfields WHERE field_product_id=" & ProductID & " AND field_type=" & DropDownList & " AND field_Control_ID=" & ddVCAuflag Thank you http://www.programmingknowledge.com/[^]
-
Hi I am developing a UserControl, I save this user control code to the database, which will be loaded dynamically to the Page. In my user control code consist of following lines: At this moment, I am manually puting this data to data base using "INSERT INTO" statement. But I get following error: Incorrect syntax near 'ProductID'. This is because single quotation mark around ProductID (field_product_id='ProductID'). If I change this single quotation to double quotation (e.g. field_id="ProductID") then this works okay. But in that scenario, SELECT statement fails while execution. Can anyone please let me know how can I achieve both successfully? Thanks in advance.