If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > VB6 connect MySQL but Error "Catastrophic Failuer",Help me

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-30-05, 11:12
NCR NCR is offline
Registered User
 
Join Date: Jan 2005
Posts: 7
VB6 connect MySQL but Error "Catastrophic Failuer",Help me

Hi,
I use vb6.0 connect MySQL4.1.9 via ODBC3.51 on Win XP and use MySQLfront create DB.

1. I so confuse about config UserId,RootPassword,Server.How i can config this parameter? and what value of these? userid=root,Password=mypass(any word),Server=127.0.0.1, yes or not?

2.i would like to copy database form one computer to another computer but I try to copy c:\program files\mysql\mysql server4.1\data\mydb and paste mydb in data folder of another computer(same path of MySQL folder both) but It’s not work both mysql> or Mysqlfront,How i can do?
3.I try this code but it’s show Error “Catastrophic Failure” . How I can do? and i would like to collect value of each field to each variable in VB6
x=10,y20,z=30,How i can do

field1 field2
record1 10 20
record2 30 50

[vbcode]
Private Sub Form_Load()

Dim con As New ADODB.Connection, rs As ADODB.Recordset
con.Open "DRIVER={MySQL ODBC 3.51 Driver};DESC=;DB=mydb;SERVER=127.0.0.1;UID=root;PA SSWORD=mypass;PORT=3306;SOCKET=;OPTION=;STMT=;"
Set rs = con.Execute("SELECT now()")
Debug.Print "Time: "; rs.Fields(0).Value
rs.Close
con.Close
Set rs = Nothing

End Sub
[/vbcode]
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On