Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT error
Message
From
28/09/1998 21:28:23
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
SPT error
Miscellaneous
Thread ID:
00141714
Message ID:
00141714
Views:
62
Hello:

I am trying to use SPT with an app and getting an error. In this test app. I have a form with a pageframe in it. The two pages of the page frame is for search and detail edit respectively. The relevant codes in the form are given below:

*Form Init

WITH THISFORM
.nConnHandle = SQLCONNECT('Relate')
IF !(.nConnHandle > 0)
= MESSAGEBOX('SQL Connect failure.')
RETURN .F.
ENDIF

IF SQLEXEC(.nConnHandle, 'SELECT * FROM relative WHERE relid = 0', 'a_relate') = -1
= MESSAGEBOX('SQL failure.')
RETURN .F.
ENDIF
ENDWITH

**************

*-- On the search button click
WITH THISFORM
IF SQLEXEC(.nConnHandle, 'SELECT * FROM relative WHERE ' + lcWhereCondition, 'a_relate') = -1
= MESSAGEBOX('SQL failure.')
ELSE
IF RECCOUNT() = 0
= MESSAGEBOX('No matching record found.')
ELSE
= CURSORSETPROP('Tables', 'relative', 'a_relate')
= CURSORSETPROP('UpdatableFieldList', cUpdatableFieldList, 'a_relate')
= CURSORSETPROP('KeyFieldList', 'relid', 'a_relate')
= CURSORSETPROP('WhereType', 3, 'a_relate')
= CURSORSETPROP('UpdateType', 1, 'a_relate')
= CURSORSETPROP('SendUpdates', .T., 'a_relate')
= CURSORSETPROP('Buffering', 5, 'a_relate)
.Refresh()
ENDIF
ENDIF
ENDWITH

*****************
When I make any edit of the data in the detail screen and try to save it, I get the following tableupdate error:

'No update tables are specified. Use Tables property of the cursor.'

This I find through AERROR function. Now what is strange is: I've set the Tables property using the CURSORSETPROP as you can see. Could anyone help me find where I am going wrong?

Thanks in advance for your help.

Rahul Chatterjee
Next
Reply
Map
View

Click here to load this message in the networking platform