> >
> >
> >
> > lcString='Driver={Microsoft ODBC for Oracle};Server=el;Uid=master;
> > Pwd=master;'
> > lnHandle=SQLSTRINGCONNECT(lcString)
> >
> > USE VFPTABLE AGAIN SHARE IN 0
> >
> > SELECT VFPTABLE
> > SCAN
> > = SQLEXEC(lnHandle, "INSERT INTO employees (FIELD1,FIELD2) VALUES(?VFPTABLE.FEILD1,?VFPTABLE.FIELD2)" )
> >
> > ENDSCAN
> >
> >
> >
> >
> >
> > Anil
> >
My Blog>
>
> I tried the code and it works up to 8 fields
> but the problem is when I tried to insert more than 8 fields, when I compiled it says that the command contains unrecognized phrase/keyword
>
> then the other one is with the same error in which here I tried multi line just like when I use replace in which I can use ,; whenever there is is another field to replace to make more easy to debug:
>
> Sample:
> SELECT vEmployee
> SCAN
> = SQLEXEC(lnHandle, "INSERT INTO employees (Code,;
> Name)
> VALUES(?vEmployee.Code,;
> ?vEmployee.EmpName)" )
>
> ENDSCAN
>
> Thank you so much!!!
As what u say it seems something is mis spelled by u! so check the complete sql before executing it
Just try along with Stefan Advice for Aerror
`
TEXT TO lcSQL NOSHOW
INSERT INTO EMPLOYEE (CODE,NAME)
VALUES (?vEmployee,Code, ?vEmployee.EmpName)
ENDTEXT
WAIT WINDOW lcSql
IF SQLEXEC(lnHandle,lcSql) < 0
=AERROR(lAError)
MessageBox(laError[1,2])
*** Do Rest you are getting Error
ENDIF
Anil
My Blog