>I have the following code for inserting a record into
>an access table, but nothing happens.
>
>SQLEXEC(lnAccess,"INSERT INTO mytable (mytable.no,mytable.batch,mytable.filename) VALUES (?tmpdata.no,?tmpdata.batch,?tmpdata.filename)", "Mytable")
>
>lnAccess is a valid connection.
>
>Anyone any ideas?
Ger,
As an addition to what Daniel said :
-Do use question marks
-Use square brackets around fieldnames (no, batch, filename might be offending as fieldnames)
-Break string into smaller pieces
ie:
lnResult = SQLEXEC( lnAccess,"INSERT INTO mytable "+;
"([no],[batch],[filename])"+;
" VALUES "+;
"(?tmpdata.no,?tmpdata.batch,?tmpdata.filename)" )
if lnResult < 0
=AERROR(aErrorArray)
CLEAR
FOR ix = 1 TO 7
? aErrorArray(ix)
ENDFOR
endif
SQLDisconnect(lnAccess)
Cetin