|
Subject:
|
Using INSERT INTO with a string Variable
|
|
Posted By:
|
Suspect
|
Post Date:
|
8/16/2006 6:11:36 AM
|
I have looked and looked and looked, i am trying to insert a string into a Table using the following code:
InsertTest = "Monkey" strSQL = "INSERT INTO Holder_tbl (Company, PolicyNo) VALUES (" & InsertTest & ",'TEST')"
When i run the SQL code it asks me to enter the Value for "Monkey" but "Monkey" is meant to be the value. Ive been starring at this code for so long i think i might explode, any help would be much appreciated.. if this makes any sense :P
Sus
|
|
Reply By:
|
Suspect
|
Reply Date:
|
8/16/2006 6:50:55 AM
|
Dont you hate it when you finally give in to asking then figure it out yourself...
InsertTest = "Monkey" strSQL = "INSERT INTO Holder_tbl (Company, PolicyNo) VALUES ('" & InsertTest & "','TEST')"
just missing a couple of "Tics"
|