Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC error
Message
 
 
To
29/01/2003 10:37:39
Diptesh Patel
Unitelsoftware Ltd.
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Miscellaneous
Thread ID:
00746694
Message ID:
00747016
Views:
13
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()
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform