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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL ST - can't close cursor !

Status
Not open for further replies.

lineman

Programmer
May 10, 2000
9
GB
Hi all
New to SQL remote access and tried the following code -
nhandle = SQLCONNECT("test")
? SQLSETPROP(nhandle, "Transactions",2)
sqtext = 'select "Test Company$Contract Details".* from dbo."Test Company$Contract Details" '
? SQLexec(nhandle,sqtext,"projects")
? CURSORSETPROP("tables",'dbo."Test Company$Contract Details"')
? CURSORSETPROP("keyfieldlist","Contract_no_,sub_contract_no_")
? CURSORSETPROP("updatablefieldlist", CURSORGETPROP("UpdatableFieldList","projects") )
? CURSORSETPROP("updatenamelist",;
CURSORGETPROP("UpdateNameList","Projects"))
? cursorsetPROP("sendupdates",.t.)
REPLACE description WITH 'newest morrison 2'
? TABLEUPDATE()
? SQLCOMMIT(nhandle)

Updates work fine but when I try to close out, I get an error " no update tables are specified" - only exit is to CTR ALT DEL !!! - all help gratefully received !
Thanks
 
sqtext = 'select "Test Company$Contract Details".* from dbo."Test Company$Contract Details" '

Something doesn't seem quite right with the select statement syntax. What is the name of the database and what is the name of the table?

pamela
 
Thanks Pamela -
The database and table are as detailed and I can fetch data no problem. I Ihave now identified the problem to the updatenamelistand/or updateablefieldlist not being recognised at the back end when I use the cursorgetprop return string. I have now resorted to listing the fields I will actually use . Current problem is that an error 'invalid update column name' occurs when i set the updatenamelist with more than 5 columns. It is always the last field that is named in the error, even though I can switch the order and get the same field accepted and another rejected if you see what I mean.
 
What is the fieldname that is causing problems?? You may be using a reserved word.

Jim RUmbaugh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top