I made a connection to sql server 7 with VB 6.0 and run a query to insert data into a table.
I must use the .refresh method at the end of the sentence for the data to be inserted, the data is inserted with no problem but the app gives me a message refering to the .refresh method it says. operation is not allowed if the object is closed.
Can anybody help me?
12-04-2006 at 01:33 AM
|
steve_w Level: Moderator Registered: 18-04-2003 Posts: 1156
Re: problems inserting data into sql7
Hi
It sounds like you're doing the refresh after your connection is closed, but you should not need to refresh the connection anyway. Do you mean to refresh a grid?.
with the refresh method the insert works right but i see the error message. If i delete the refresh method i don't see the message but the insert doesn't work.
Thank you in advance.
[Edited by morsas on 12-04-2006 at 06:01 PM GMT]
13-04-2006 at 12:01 AM
|
steve_w Level: Moderator Registered: 18-04-2003 Posts: 1156
Goran Level: Moderator Registered: 16-05-2002 Posts: 1681
Re: problems inserting data into sql7
May I ask why are you using an ADODC control just to insert a record? Why dont you use connection object instead? and why are you using ODBC driver in connection string, since this way one extra layer is involved in communication?
____________________________
If you find the answer helpful, please mark this topic as solved.