Connecting Applications to Mysql
am 10.06.2005 12:21:37 von BONNEY Nat
------_=_NextPart_001_01C56DA6.2F23F8D4
Content-Type: text/plain
Dear Sir/Madam,
I am VB6 programmer who is new to mysql and would like to know how best to
connect my applications to Mysql.
Especially where to put the connection code in my applications.
Thanks in advace
Bonney.
------_=_NextPart_001_01C56DA6.2F23F8D4--
Re: Connecting Applications to Mysql
am 14.06.2005 00:22:37 von Daniel Kasak
BONNEY Nat wrote:
>Dear Sir/Madam,
>
>I am VB6 programmer who is new to mysql and would like to know how best to
>connect my applications to Mysql.
>Especially where to put the connection code in my applications.
>
>Thanks in advace
>Bonney.
>
>
>
>
I wrote a couple of pages on that topic a while ago. It's at:
http://entropy.homelinux.org/MySQL/
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@nusconsulting.com.au
website: http://www.nusconsulting.com.au
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org
RE: Connecting Applications to Mysql
am 14.06.2005 00:53:08 von jbonnett
I use this and it works very well
http://www.vbmysql.com/projects/vbmysqldirect/
The steps you need to get connected are
1. Include a reference to VB MySQL Direct in Project/References
(references vbmysqldirect.dll) for your VB6 project.
2. Connect to MySQL, something like this
Set gCon =3D New MYSQL_CONNECTION
gCon.OpenConnection F.Server, F.User, F.Password, F.Database
3. Then execute queries something like this
Public Function RunSQL(SQL As String) As MYSQL_RS
Dim rs As MYSQL_RS
Dim Cmd As String
=20
Cmd =3D UCase(Left(SQL, 4))
Debug.Print SQL
If Cmd =3D "SELE" Or Cmd =3D "SHOW" Then
' SELECT or SHOW can return a resordset
Set rs =3D gCon.Execute(SQL, gRecordsAffected)
Set RunSQL =3D rs
Else
' An action query, don't worry about recordset
gCon.Execute SQL, gRecordsAffected
End If
=20
With gCon.Error
If .Number <> 0 Then
MsgBox .Description, vbOKOnly + vbExclamation, "RunSQL
Database error"
.Clear
End If
End With
End Function
There are lots of variations on this but this is what I do.
John Bonnett
-----Original Message-----
From: BONNEY Nat [mailto:NBonney@iom.int]=20
Sent: Friday, 10 June 2005 7:52 PM
To: 'myodbc@lists.mysql.com'
Subject: Connecting Applications to Mysql
Dear Sir/Madam,
=20
I am VB6 programmer who is new to mysql and would like to know how best
to
connect my applications to Mysql.
Especially where to put the connection code in my applications.=20
=20
Thanks in advace
Bonney.
=20
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg
RE: Connecting Applications to Mysql
am 14.06.2005 20:01:03 von James Cass
I use Runtime Revolution (http://www.runrev.com) to write to 2 MySQL db's simultaneously (one is MacOSX, the other is Fedora Core 3) for a Department wide production ciritcal app, written in Revolution. Works beautifully. You can download a trial version of Rev here: http://downloads.runrev.com/
I got a jump-start by downloading a sample stack from a user contrubution posted to the RunRev list. Look for the two sample stacks here: http://www.troz.net/Rev/. They are called ySQL.rev.gz and MySQLtests.rev.gz.
Cheers...James
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org