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

Error Number 1491. 1

Status
Not open for further replies.

knopmike

Programmer
Sep 6, 2001
12
CA
I'm receiving the above error when I click on the exit button of my form; even if i didn't add, delete, create, or read a record. I manually opened and ran every view used in the form and manually everthing seems ok. I stepped through the code after clicking the exit button and the error comes after the last line of code of the destroy event of another object with no hints as to what is being executed after that. Backend is sql server 2000.

If anyone has any experience with the above message or has any advice, I would appreciate any response.

Thanks. Mike
 
Could there be something in the Query Unload event of the parent of the form you're using? There could be something there which tries to do a table update. What code are you using in your exit button? The help file on Query Unload says it's bypassed if you use something like thisform.release.

Dave Dardinger
 
Error 1492 per VFP7 help is:

No update tables are specified. Use the Tables property of the Cursor object.

You could place the following code in one of the error events in the form to trap errors. Perhaps you could get the above message if you place the code in the exit button error event. Be sure and leave the error event parameters in place.

cMessageTitle = 'An Error occurred in the exit button object'
cMessageText = "Error Message: "+message()+chr(13)+;
"Number: "+STR(nError)+chr(13)+;
"Method: "+cMethod+chr(13)+;
"Line No: "+STR(nLine)+chr(13)+;
chr(13)+;
"Select OK to continue."
nDialogType = 0 + 64
* 0 = OK
* 64 = Information Icon
nAnswer = MESSAGEBOX(cMessageText, nDialogType,
cMessageTitle)
Return


Leland
 
Hi,

It's me again. If your using ADO OLE DB to connect to MsSQL you might try closing the connection and recordset with something like the following:

myrs.CLOSE
myconn.CLOSE
Release myrs
Release myconn

Of course, in the click event of the exit button place thisform release

It would be interesting to know if your edits, inserts, and deletes are working before you exit the form.


Leland
 
Thanks for the posts.

I'm not using ado, but rather odbc.

I got side-tracked for a few days, but am now back on this. Will take the above advice and see what I come up with.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top