Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No update tables specified error

Status
Not open for further replies.

SGLong

Programmer
Jun 6, 2000
405
US
I am running a fairly simple SQL Passthru command (see below) and am receiving the following error message when I try to access the result set (the 'BROWSE' command below):

No update tables are specified. Use the Tables property of the cursor (Error 1491).

Code:
nHandle = SQLCONNECT("SQLDatabase")
SQLSETPROP(nHandle,"Asynchronous", .F.)
cSql = "EXEC GetXML_DND_IRS"
nResult = SQLEXEC(nHandle,cSql,'XML_FILE')
BROWSE

What does this error mean and how can I resolve it?

Steve

 
And what is the result of this:
Code:
nHandle = SQLCONNECT("SQLDatabase")
IF nHandle > 0
   SQLSETPROP(nHandle,"Asynchronous", .F.)
   cSql = "EXEC GetXML_DND_IRS"
   nResult = SQLEXEC(nHandle,cSql,'XML_FILE')
   IF nResult < 0
      AERROR(laError)
      MessageBox(laError[1,2])
   ELSE
      SELECT XML_FILE
      BROWSE 
   ENDIF
ELSE
      AERROR(laError)
      MessageBox([Can not Connect ]+laError[1,2])
ENDIF

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
nResult is coming in as 1, so the query is running successfully.
 
And what is the code of the SP?
What you return?
XML or resultset?

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
The SP returns a single record, single field result set that contains an XML string. I then plan on using STRTOFILE command to write the string to an XML file on the network.

 
Add a Cursorsetprop('Buffering',5,'XML_FILE') right after the SQLEXEC and see if you then can browse. Because if in some way the connection is setup to create updatable SPT cursors, even a browse in an unbuffered cursor might result in that error.

I'd rather do lcXML = XML_FILE.TheFieldname (if the SP doesn't set a field name it will be Exp).

Then StrtoFile(lcXML,'filename.xml') or use lcXML in other ways.

Bye, Olaf.
 
All,

After much testing I was able to determine that somehow the "Asynchronous" property for the database had been set to True. When that occurs the SQLDISCONNECT statement will error out.

Thanks to all for your suggestions.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top