TomSwingruber
Programmer
I am attempting to hook into MySQL on a Linux box
using Visual Basic on a Windows box.
The particulars...
MySQL server machine
name Linny
local IP address 192.168.1.123
RedHat 9
MySQL 4.1.9-0
MySQL client machine
name Winny
local IP address 192.168.1.124
Windows 98se
Visual Basic 6
MySQL ODBC 3.51
I set up a simple database 'tester' with a single table
(which has a couple columns to hold first and last names).
Also, I gave the user 'somebody' access to the table.
A quick PHP program, running on the Linux box, is able
to access the database and table with no problems.
Hooking to MySQL from the Windows box, using the "ODBC
Data Source Administrator" (found in the control panel),
lets me make and test a connection, no problem.
The VB program is as follows...
| Private Sub Form_Load()
|
| Dim conn As ADODB.Connection
| Dim cs As String
|
| Set conn = New ADODB.Connection
| conn.CursorLocation = adUseClient
| cs = "DRIVER={MySQL ODBC 3.51 Driver};" _
| & "SERVER=192.168.1.123;" _
| & "DATABASE=tester;" _
| & "UID=somebody;" _
| & "PWD=sbpass777;" _
| & "OPTION=" & 3
|
| conn.ConnectionString = cs
| conn.Open
|
| End Sub
When I run this program, I get...
Run-time error '-2147418113 (8000ffff)':
Unexpected failure
However, if I change the password to something bogus,
I get instead...
Run-time error '-2147467259 (80004005)':
[MySQL][ODBC 3.51 Driver]Access denied for user
'somebody'@'Winny' (using password: YES)
Any help would be appreciated...
Thanks!
using Visual Basic on a Windows box.
The particulars...
MySQL server machine
name Linny
local IP address 192.168.1.123
RedHat 9
MySQL 4.1.9-0
MySQL client machine
name Winny
local IP address 192.168.1.124
Windows 98se
Visual Basic 6
MySQL ODBC 3.51
I set up a simple database 'tester' with a single table
(which has a couple columns to hold first and last names).
Also, I gave the user 'somebody' access to the table.
A quick PHP program, running on the Linux box, is able
to access the database and table with no problems.
Hooking to MySQL from the Windows box, using the "ODBC
Data Source Administrator" (found in the control panel),
lets me make and test a connection, no problem.
The VB program is as follows...
| Private Sub Form_Load()
|
| Dim conn As ADODB.Connection
| Dim cs As String
|
| Set conn = New ADODB.Connection
| conn.CursorLocation = adUseClient
| cs = "DRIVER={MySQL ODBC 3.51 Driver};" _
| & "SERVER=192.168.1.123;" _
| & "DATABASE=tester;" _
| & "UID=somebody;" _
| & "PWD=sbpass777;" _
| & "OPTION=" & 3
|
| conn.ConnectionString = cs
| conn.Open
|
| End Sub
When I run this program, I get...
Run-time error '-2147418113 (8000ffff)':
Unexpected failure
However, if I change the password to something bogus,
I get instead...
Run-time error '-2147467259 (80004005)':
[MySQL][ODBC 3.51 Driver]Access denied for user
'somebody'@'Winny' (using password: YES)
Any help would be appreciated...
Thanks!