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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

maximum columns for an INSERT

Status
Not open for further replies.

dakotafox

Programmer
Apr 14, 2000
53
US
I am new to the VFP6.0 to Microsoft SQL Server process. My problem is when trying to insert records with the Insert statement.
I have 11 fields identified with their values and the INSERT statement functions correctly. Now I am trying to add additional fields and their values and the statement errors.

my code is:
cSQL = "INSERT into tblAMC " + ; "(dept,dept2,dept3,line_no,username,customer_code,vendor,sub_account,account,account2,account3)"+ ;
" values ('&value2','&value3','&value4','&value5','&value6','&value7','&value8','&value9','&value10','&value11','&value12')"

I can change the fields and their values and it works correctly, but if I try to add another field, I get the error "command contains unrecognized phrase/keyword"

Thank you for any help
 

It seems likely that the SQL statement is being truncated. What is the maximum length of the variable cSQL? It seems that it could be over 255 characters long. 255 is often a limit for character strings. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top