Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLEXECQUERY INSERT Problems

Status
Not open for further replies.

Sillygirl

Programmer
May 3, 2002
80
0
0
US
HERE is my query:

qry& = SQLExecQuery(id&, "INSERT INTO PRODUCTION_COUNTS_LOG (Timestamp,Shift,Hour,Motor,Cartrac,Body,Trim_Prod,Chas_Prod,Ship) VALUES ('&CSTR(now)&',CUR_SHIFT.VALUE,HR_CNT_HR.VALUE,MOT_CNT_HR.VALUE,CAR_CNT_HR.VALUE,BDY_CNT_HR.VALUE,PNT_CNT_HR.VALUE" &_
"& T_CT_HR.VALUE,CH_CT_HR.VALUE,SH_CNT_HR.VALUE)")

I am getting the error message:

The returned error is 3129 - MS ODBC SQL DRIVER SQL SERVER The name 'VALUE'is not permitted in this context. Only constants, expressions, or variable allowed here. Column names are not permitted.

Can anyone help me with this problem?

Thanks in advance
- Silly Girl [sadeyes]

 
Um, what application are you calling SQL from? Can you show us the TRANSACT-SQL statement that is passed to the server by this function (not the variable values, a sample of REAL passed values)?

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Pity the insomniac dyslexic agnostic. He stays up all night, wondering if there really is a dog.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top