I have defined in a SQL 7 database (with two tables) the field name 'Record Number' which is stored in the Table 'Records' and 'NextRec' stored in the table 'NextRecordCount'. My SQL statment is trying to add the current value (an INT) of 'NextRec' in the Record Number field. Then after the post statement, I will inc (by 1) the 'NextRec' so its ready for the next transistion. Here is a copy of my statement:
RecordNumber1 : Integer;
AddRecQuery.Sql.Add('Insert INTO Records(RecordNumber) values ('+ RecordNumber1 +')');
But I get an error that states:
"The name RecordNumber is not permitted in this context. Only constants, expressions, or variables are allowed here. Column names are not permitted."
Can anyone help me figure out where my error is? I alos have some string values that I need to add to the script too, but they cause an error saying the table expects an Integer, but gets a string value...(pointing to the recordnumber field).