Hi,
I cant able to find out my problem itself.......gr eat confusion.when i connecting my local mysql database(xp) on to my local machine(xp),its working fine ,no problem at all.
I have installed "Mysql ODBC 3.51 Driver".
While,i am trying the same thing.But there is an difference.Here ,
I am connecting mysql database (from remote machine xp) to my local machine(xp) where i am running my visual basic program.
My Code:
Private Sub gen_Click()
Dim cn1 As New ADODB.Connectio n
Dim generate As New ADODB.Command
Dim rs1 As New ADODB.Recordset
Set cn1 = New ADODB.Connectio n
cn1.ConnectionS tring = "driver={My SQL ODBC 3.51 Driver};server= 10.93.199.253;d atabase=org;dat a source=org1;Per sist Security Info=True;Optio n=3"
cn1.Open
With generate
.ActiveConnecti on = cn1
.CommandType = adCmdText
.CommandText = "select uid from user"
End With
Set rs1 = generate.Execut e
Open "C:\org.txt " For Output As #2
While Not rs1.EOF
Print #2, rs1.Fields(0);
rs1.MoveNext
Wend
Close #2
End Sub
when,i running my program.The following error comes out
Run-time error '-2147467259(8000 4005)':
[Microsoft][ODBC Driver Manager]Data Source name not found and no default driver specified.
I cant able to find out my problem........ ..please help me
In remote machine,
(1)I turned ON the firewall
(2)Given Grant permission
(3)ODBC connection
Under System DSN:
i) DSN name=org1
ii)Server: Localhost
iii)user:root and no password
iv)Database name=org
These are the steps which i followed in the remote machine,where i am going to access mysql database "org"
Please solve my error.......... ........
Thanks in advance........
Regards,
santhanalakshmi
I cant able to find out my problem itself.......gr eat confusion.when i connecting my local mysql database(xp) on to my local machine(xp),its working fine ,no problem at all.
I have installed "Mysql ODBC 3.51 Driver".
While,i am trying the same thing.But there is an difference.Here ,
I am connecting mysql database (from remote machine xp) to my local machine(xp) where i am running my visual basic program.
My Code:
Private Sub gen_Click()
Dim cn1 As New ADODB.Connectio n
Dim generate As New ADODB.Command
Dim rs1 As New ADODB.Recordset
Set cn1 = New ADODB.Connectio n
cn1.ConnectionS tring = "driver={My SQL ODBC 3.51 Driver};server= 10.93.199.253;d atabase=org;dat a source=org1;Per sist Security Info=True;Optio n=3"
cn1.Open
With generate
.ActiveConnecti on = cn1
.CommandType = adCmdText
.CommandText = "select uid from user"
End With
Set rs1 = generate.Execut e
Open "C:\org.txt " For Output As #2
While Not rs1.EOF
Print #2, rs1.Fields(0);
rs1.MoveNext
Wend
Close #2
End Sub
when,i running my program.The following error comes out
Run-time error '-2147467259(8000 4005)':
[Microsoft][ODBC Driver Manager]Data Source name not found and no default driver specified.
I cant able to find out my problem........ ..please help me
In remote machine,
(1)I turned ON the firewall
(2)Given Grant permission
(3)ODBC connection
Under System DSN:
i) DSN name=org1
ii)Server: Localhost
iii)user:root and no password
iv)Database name=org
These are the steps which i followed in the remote machine,where i am going to access mysql database "org"
Please solve my error.......... ........
Thanks in advance........
Regards,
santhanalakshmi
Comment