Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT error
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
SPT error
Divers
Thread ID:
00141714
Message ID:
00141714
Vues:
63
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform