INSERT statement problem using variables (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Guest -> INSERT statement problem using variables (3/5/2001 15:25:00)

Jeesh! I know this can't be that difficult! ;-)

What am I doing Wrong!?

The Insert SQL statement:

SQL = "INSERT INTO test.txt VALUES(strName,strStreet,strCity,strState,strZip)"

NOTE: the variables come from a firm and are DIM'd prior to the statement.

The Error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Text Driver] Too few parameters. Expected 5.


Help!
Larry





Elecia -> RE: INSERT statement problem using variables (3/5/2001 15:39:00)

Is test.txt the name of the table or is it actully a text box?




Guest -> RE: INSERT statement problem using variables (3/5/2001 15:44:00)

The DB is a text DB and the table is test.txt It has something to do with the syntax of the VALUES(xxxxx) variables, it works fine with direct input,

SQL = "INSERT INTO test.txt VALUES('Name','Street','City','State','Zip')"

This yields the text,ie: 'Name'(single for double quotes here), into the data fields in the record.





Spooky -> RE: INSERT statement problem using variables (3/5/2001 18:47:00)

Did my email help?

Im a bit lost on the talk of single vs double quotes too.

All quotes should be single

------------------
Spooky
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!





Guest -> RE: INSERT statement problem using variables (3/5/2001 21:26:00)

Yep, Spooky, thanks that was it. Thank you as Elicia!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.201172E-02