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

run time error 217

Status
Not open for further replies.

martin123123

Programmer
Jun 23, 2003
18
0
0
NO
every time I close my application, I get a run-time 217 error (Exception: unknown Exception). What is this all about? I've tried searching on the internet but with no luck.

I think it may have to do with my TADOConnection object. I can't free it. When I try to free it on formclose the app stalls. when i don't free it I get the run-time error.

my TADOConnection is declared as a global variable, created in formcreate and is supposed to be freed in formclose

thanks in advance
 
The usual place to free objects created in FormCreate is in FormDestroy.

Can you show us the code that you use to create and destroy your TADOConnection object?

Have you tried writing a test application that consists only of creating and destroying your TADOConnection object in an identical way to your application? Does it still give a 217 error?

Andrew
 
my code is like 8 units so it's pretty big...

but when I just create a button which only will free my adoconnection after i have created and connected it, the program stalls.. this can't be right.

I think I'll try what you said and writing a test application.

tnks,
martin
 
"..my TADOConnection is declared as a global variable, created in formcreate and is supposed to be freed in formclose"

If your TADOConnecton is a descendent of TComponent, why not make the form its owner and let it free it?

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top