HI THERE....
i'm just want to ask to everyone that can solve my problem.
my situation:
I have an application that developed with VB6. I also have a MySQL database that installed in Window2000 server.
my question:
how i want to connect to the database?
TRY-- using odbc = Fail
TRY-- using DSN less = fail
i sent along to you the connection code:
i'm just want to ask to everyone that can solve my problem.
my situation:
I have an application that developed with VB6. I also have a MySQL database that installed in Window2000 server.
my question:
how i want to connect to the database?
TRY-- using odbc = Fail
TRY-- using DSN less = fail
i sent along to you the connection code:
| Code: |
|
Public Function myDB(Sqltxt As String, DBmode As Integer) As ADODB.Recordset Dim db As New ADODB.Connection Dim rs As New ADODB.Recordset Dim LockType As String Set db = New ADODB.Connection 'CONNECTION db.ConnectionString = "Driver={mySQL ODBC 3.51 Driver};Server=svrums;Port=3306;Option=3;Database=UMS;Uid=root;Pwd=UMS;" db.CursorLocation = adUseClient db.Open 'RECORDSET Set rs = New ADODB.Recordset rs.Open Sqltxt, db, adOpenDynamic, DBmode, adCmdText Set myDB = rs 'adLockBatchOptimistic 'adLockOptimistic 'adlockoptimistic 'adLockReadOnly End Function |
