Click here to Skip to main content
15,906,463 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to create Database file programmatically? Pin
MityaB12-Jul-06 2:40
MityaB12-Jul-06 2:40 
AnswerRe: How to create Database file programmatically? Pin
Eric Dahlvang12-Jul-06 3:12
Eric Dahlvang12-Jul-06 3:12 
QuestionIterating trough database tables (SQL) Pin
johan313112-Jul-06 0:59
johan313112-Jul-06 0:59 
AnswerRe: Iterating trough database tables (SQL) Pin
kumarprabhakar7412-Jul-06 2:00
kumarprabhakar7412-Jul-06 2:00 
AnswerRe: Iterating trough database tables (SQL) Pin
Steve S12-Jul-06 3:03
Steve S12-Jul-06 3:03 
AnswerRe: Iterating trough database tables (SQL) Pin
Scott Serl12-Jul-06 6:29
Scott Serl12-Jul-06 6:29 
GeneralRe: Iterating trough database tables (SQL) Pin
johan313113-Jul-06 0:35
johan313113-Jul-06 0:35 
QuestionINSERT INTO and SELECT statement... pls help urgently.. Pin
For_IT12-Jul-06 0:19
For_IT12-Jul-06 0:19 
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:

<asp:SqlDataSource ID="GetDataFromDatabase" runat="server" ConnectionString="<%$ ConnectionStrings:sConnectionString %>"
SelectCommand="SELECT field_defaultvalue FROM cp_productfields WHERE field_product_id='ProductID' AND field_type='DropDownList' AND field_Control_ID='ddVCAuflag'"
ProviderName="<%$ ConnectionStrings:sConnectionString.ProviderName %>"></asp:SqlDataSource>

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.


AnswerRe: INSERT INTO and SELECT statement... pls help urgently.. Pin
VK-Cadec12-Jul-06 9:53
VK-Cadec12-Jul-06 9:53 
QuestionData Access Application Block Pin
Brendan Vogt11-Jul-06 21:22
Brendan Vogt11-Jul-06 21:22 
AnswerRe: Data Access Application Block Pin
kumarprabhakar7412-Jul-06 0:25
kumarprabhakar7412-Jul-06 0:25 
QuestionThe using block Pin
Brendan Vogt11-Jul-06 21:12
Brendan Vogt11-Jul-06 21:12 
AnswerRe: The using block Pin
ekhorutomwen11-Jul-06 22:49
ekhorutomwen11-Jul-06 22:49 
QuestionRe: The using block Pin
Brendan Vogt11-Jul-06 23:08
Brendan Vogt11-Jul-06 23:08 
AnswerRe: The using block [modified] Pin
ekhorutomwen11-Jul-06 23:30
ekhorutomwen11-Jul-06 23:30 
GeneralRe: The using block Pin
Brendan Vogt11-Jul-06 23:47
Brendan Vogt11-Jul-06 23:47 
AnswerRe: The using block Pin
Kevin McFarlane12-Jul-06 0:22
Kevin McFarlane12-Jul-06 0:22 
QuestionChecking for an Existing record when Updating Pin
Brendan Vogt11-Jul-06 21:08
Brendan Vogt11-Jul-06 21:08 
AnswerRe: Checking for an Existing record when Updating Pin
kumarprabhakar7412-Jul-06 0:21
kumarprabhakar7412-Jul-06 0:21 
QuestionUpdate statement Pin
angelagke11-Jul-06 18:23
angelagke11-Jul-06 18:23 
AnswerRe: Update statement Pin
Dinuj Nath11-Jul-06 20:51
Dinuj Nath11-Jul-06 20:51 
GeneralRe: Update statement Pin
angelagke11-Jul-06 21:37
angelagke11-Jul-06 21:37 
GeneralRe: Update statement Pin
VK-Cadec12-Jul-06 10:01
VK-Cadec12-Jul-06 10:01 
GeneralRe: Update statement Pin
angelagke13-Jul-06 2:07
angelagke13-Jul-06 2:07 
QuestionConnectionString works for VB6/VBNET/VBNET2003 for SQL SERVER but not for VBNET2005 SQL SERVER only local Pin
Serpiente11-Jul-06 15:16
Serpiente11-Jul-06 15:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.