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:
00747012
Views:
23
You've to check return values after SQLPREPARE() and SQLEXEC() to make sure that they executed w/o errors.
lnResult = SQLPREPARE(nHandle,cInsStr)
IF lnResult < 1    && Error
  * Use AERROR() to retrieve ODBC error
  * Process error
ENDIF
lnResult= SQLEXEC(nHandle)
IF lnResult < 1    && Error
  * Use AERROR() to retrieve ODBC error
  * Process error
ENDIF
>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()
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform