Tryin2Koad
05-28-2004, 01:45 PM
We are using Windows 2000 Pro (SP4), to access an Informix 7.31 database on a Windows 2000 Server (SP3).
RDB set as public variable in form as follows:
Public RDB As Database
It is then opened up as follows:
Set RDB = OpenODBCDatabase()
--------------------
Function OpenODBCDatabase is as follows
--------------------
Function OpenODBCDatabase() As Database
On Error GoTo OpenDatabaseError
Set OpenODBCDatabase = Workspaces(0).OpenDatabase("DatabaseName", _
False, True, _ "ODBC;DSN=DSNName;DATABASE=DatabaseNameOnDisk;UID=UserID;PWD=password;L OGINTIMEOUT=240")
On Error Resume Next
Exit Function
OpenDatabaseError:
MsgBox "Trying to open the Database" & Chr(13) & _
"Error # " & Err.Number & Chr(13) & _
Err.Description & Chr(13) & _
"Generated from " & Err.Source, vbCritical
Resume Next
End Function
--------------------
The code that now triggers the error (but worked in the past):
SQLQuery = 'UPDATE ttdsls040001 SET t_opicker = "abc12345" WHERE t_orno = 50000'
RDB.Execute SQLQuery, dbSeeChanges + dbFailOnError + dbSQLPassThrough
I get an application error, details below:
First this pops up:
vb6.exe Application Error
The instruction at "0x04672b9f" referenced memory at "0x6d3fd0ee". The memory could not be read. (Note - the addresses change every time I try this).
So, I click "Cancel", which brings up the debugger. The debugger shows:
Unhandled exception in VB6.EXE(DAO350.DLL) 0xC0000005 Access Violation
I click "OK" then get this:
A bunch of Assembler, with the little yellow arrow pointing to this line:
04672B9F cmp esi,dword ptr [eax]
The Call Stack shows:
DAO350! 04672b9f()
6d3fd0ee()
This used to work. What is different? I don't know. Why is it no longer working? I'm not sure. I have been playing around with the project references to see if anything helps. I was/am using Microsoft DAO 2.5/3.5 compatibility library. Any assistance would be appreciated.
RDB set as public variable in form as follows:
Public RDB As Database
It is then opened up as follows:
Set RDB = OpenODBCDatabase()
--------------------
Function OpenODBCDatabase is as follows
--------------------
Function OpenODBCDatabase() As Database
On Error GoTo OpenDatabaseError
Set OpenODBCDatabase = Workspaces(0).OpenDatabase("DatabaseName", _
False, True, _ "ODBC;DSN=DSNName;DATABASE=DatabaseNameOnDisk;UID=UserID;PWD=password;L OGINTIMEOUT=240")
On Error Resume Next
Exit Function
OpenDatabaseError:
MsgBox "Trying to open the Database" & Chr(13) & _
"Error # " & Err.Number & Chr(13) & _
Err.Description & Chr(13) & _
"Generated from " & Err.Source, vbCritical
Resume Next
End Function
--------------------
The code that now triggers the error (but worked in the past):
SQLQuery = 'UPDATE ttdsls040001 SET t_opicker = "abc12345" WHERE t_orno = 50000'
RDB.Execute SQLQuery, dbSeeChanges + dbFailOnError + dbSQLPassThrough
I get an application error, details below:
First this pops up:
vb6.exe Application Error
The instruction at "0x04672b9f" referenced memory at "0x6d3fd0ee". The memory could not be read. (Note - the addresses change every time I try this).
So, I click "Cancel", which brings up the debugger. The debugger shows:
Unhandled exception in VB6.EXE(DAO350.DLL) 0xC0000005 Access Violation
I click "OK" then get this:
A bunch of Assembler, with the little yellow arrow pointing to this line:
04672B9F cmp esi,dword ptr [eax]
The Call Stack shows:
DAO350! 04672b9f()
6d3fd0ee()
This used to work. What is different? I don't know. Why is it no longer working? I'm not sure. I have been playing around with the project references to see if anything helps. I was/am using Microsoft DAO 2.5/3.5 compatibility library. Any assistance would be appreciated.