
ODBC issue with VB4 (16 bits) - Mouse fail
The following code segment is written in VB4 (16 bit version):
Dim strConnect As String
Set wspRemote = DBEngine.Workspaces(0)
'Procedure 1: MYDB is the database in INGRES 6
' strConnect = "ODBC;DSN=INGRES;DATABASE=MYDB;"
' Set dbsRemote = wspRemote.OpenDatabase("", False, False,
strConnect)
'Procedure 2: mydb.mdb is an attached database link to MYDB of INGRES 6
' Set dbsRemote = wspRemote.OpenDatabase("C:\mydb.mdb")
'Continue
Set Mycommission = dbsRemote.OpenRecordset("cm_commission",
dbOpenDynaset)
Data1.Connect = strConnect
Data1.DatabaseName = ""
Data1.RecordSource = "cm_commission"
Data1.Refresh
Problem:
1. Whenever I use data control (Data1) in VB4 (with either Procedure 1
or 2), the left button of the mouse disable and it won't allow me to
open another tables (Error : 3146 ODBC call failed)
2. I take the data control out and run the Procedure 1. When a dialog
box display and request for the user name and password, the left button
of the mouse disable without any error message.
(When I use the Procedure 2, no problem of the mouse is detected)
Anyone have ideas?