INSERT statement using variables
From: sm (sm_at_discussions.microsoft.com)
Date: 11/02/04
- Next message: Shiva: "Re: INSERT statement using variables"
- Previous message: Ged Mead: "Re: Can I have an Event & Method with the same name?"
- Next in thread: Shiva: "Re: INSERT statement using variables"
- Reply: Shiva: "Re: INSERT statement using variables"
- Reply: Herfried K. Wagner [MVP]: "Re: INSERT statement using variables"
- Reply: Cor Ligthert: "Re: INSERT statement using variables"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Nov 2004 00:04:06 -0800
Hi All,
Can anybody give me the syntax to insert a record into SQL server through VB
code using variables?
The following statement is failing!
sInsertQuery = "INSERT INTO TestTab (Col1, Col2, Col3, Col4) Values(" & _
str1 & "," & dt1 & "," & str2 & "," & str3 & ")"
where str1 = "col1"
dt1 = getdate()
str2 = "col2"
str3 = "col3"
Thanks
- Next message: Shiva: "Re: INSERT statement using variables"
- Previous message: Ged Mead: "Re: Can I have an Event & Method with the same name?"
- Next in thread: Shiva: "Re: INSERT statement using variables"
- Reply: Shiva: "Re: INSERT statement using variables"
- Reply: Herfried K. Wagner [MVP]: "Re: INSERT statement using variables"
- Reply: Cor Ligthert: "Re: INSERT statement using variables"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|