Newbie SQL Queston on INSERT
From: Dennis (Dennis_at_discussions.microsoft.com)
Date: 03/18/05
- Next message: Chaim: "RE: Newbie SQL Queston on INSERT"
- Previous message: TJ: "Roll back not working on linked-table in access???"
- Next in thread: Chaim: "RE: Newbie SQL Queston on INSERT"
- Reply: Chaim: "RE: Newbie SQL Queston on INSERT"
- Reply: Chaim: "RE: Newbie SQL Queston on INSERT"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 18 Mar 2005 09:29:02 -0800
I am trying to get my SQL statement correct for inserting data into a column
using a string variable in VB.Net. Following is my code:
dim str as string = new "First Record"
DBCmd.CommandText = "INSERT INTO Items (Title) VALUES (str)"
DBCmd.ExecuteNonQuery()
The value it puts into the Title Field is "str" not "First Record". What am
I doing wrong?
-- Dennis in Houston
- Next message: Chaim: "RE: Newbie SQL Queston on INSERT"
- Previous message: TJ: "Roll back not working on linked-table in access???"
- Next in thread: Chaim: "RE: Newbie SQL Queston on INSERT"
- Reply: Chaim: "RE: Newbie SQL Queston on INSERT"
- Reply: Chaim: "RE: Newbie SQL Queston on INSERT"
- Messages sorted by: [ date ] [ thread ]