I have a bit of a weird error and wonder if anyone can help?
I have written a VB6 app which basically sits and performs a timer-based loop which looks for files in a directory.
On finding a file the program then opens an adodc connection similar to the way shown below:
Dim dbconn As ADODB.Connection, cnString As String, sqlquery As String
Set dbconn = New ADODB.Connection
cnString = "Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=ENGDEV;Data Source=SQLSERVER"
dbconn.ConnectionString = cnString
The program uses this connection string to execute an update query based upon the contents of the tet file that was found and then closes the connection as follows
'execute the query that has been generated
Set dbconn = Nothing
The program will then continue looping until such time as another file is encountered.
This works absolutely perfectly until the application has been running for about 24 hours at which point when the application tries to open the database connection a message displaying the following is displayed
Run-time error '-2147467259 (80004005)':
Is this being caused because my program is not freeing up memory during the loop or is there another reason???