Diptesh,
I seriously doubt that SQLPrepare is worth the effort for an insert statement, you should just SQLExec(nHandle, cInsStr)
You also have to have a ' around the text and date items:
['] + allt(ThisForm.Text1.value)+ [',] + ;
>I am using SQLexec() with SQLprepare() function it gives me following error.
>
>SQL statemnt parameter is required for non-prepared SQLEXEC() calls.
>
>sample code is as follows
>cInsStr = "Insert into APPL values("+allt(str(m.MAppKey))+","+ ; thisform.cmbBranch.value+","+;
> allt(ThisForm.Text1.value)+","+;
> "'',"+;
> "0,"+;
> "0,"+;
> "0,"+;
> "0,"+;
> "'1',"+;
> "'N',"+;
> m.DtStamp+")"
> =sqlprepare(nHandle,cInsStr)
> =sqlexec(nHandle)
>
>&& where APPL is remote table name
>&& mappkey is numeric
>&& cmbBranch is 3 digit code
>&& dtstamp is 01/29/2003 in character format.
>
>&& handle is frmm sqlconnect()