FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


VB + MYSQL





masaru
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:

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
MrBaseball34
masaru wrote:
<SNIP>

Port=3306

<SNIP>



Is that port open on both ends of the connection?
Check your firewall.
kv
Make sure you have installed mysql driver on the client where your vb code is running. You can get the driver at
http://dev.mysql.com/downloads/connector/odbc/3.51.html
Related topics
question on vb programming...
Sort of a wierd question for a frih admin.
question on vb language and mysql...
HELP in VB6 and MySQL
MySQL in Visual Basic?
how to connect vb6 to mysql remotely?
mysql connection question
php admin and mysql admin console
Mysql And PHP HELP PLZ
Question about MySQL!
Do you use a CMS script?
What computer languages you know?
PHP, MySQL...
PHP Book (Php and Mysql for Dynamic Web Sites)
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.