| | Cara mengkoneksikan VB.net ato VB6 ke MySQL | |
| | Author | Message |
---|
CLiFF Administrator
Number of posts : 564 Age : 38 Location : Anywhere... Points : 10009 Registration date : 2008-06-03
| Subject: Cara mengkoneksikan VB.net ato VB6 ke MySQL Thu Sep 18, 2008 9:47 pm | |
| pertama.... sediakan dlu/download trus install MySQL ODBC driver kalo gak punya silahkan download disini - Code:
-
http://dev.mysql.com/downloads/connector/odbc/3.51.html
nah contoh codingnya ini..... - Code:
-
Private Sub cmdConnectMySQL_Click()
Dim cnMySql As New rdoConnection Dim rdoQry As New rdoQuery Dim rdoRS As rdoResultset
' set up a remote data connection ' using the MySQL ODBC driver. ' change the connect string with your username, ' password, server name and the database you ' wish to connect to.
cnMySql.CursorDriver = rdUseOdbc cnMySql.Connect = "uid=YourUserName;pwd=YourPassword; server=YourServerName;" & _ "driver={MySQL ODBC 3.51 Driver}; database=YourDataBase;dsn=;" cnMySql.EstablishConnection
' set up a remote data object query ' specifying the SQL statement to run.
With rdoQry .Name = "selectUsers" .SQL = "select * from user" .RowsetSize = 1 Set .ActiveConnection = cnMySql Set rdoRS = .OpenResultset( rdOpenKeyset, rdConcurRowVer) End With
' loop through the record set ' processing the records and fields.
Do Until rdoRS.EOF With rdoRS
' your code to process the fields ' to access a field called username you would ' reference it like !username
rdoRS.MoveNext End With Loop
' close record set ' close connection to the database
rdoRS.Close cnMySql.Close
End Sub
kalo ada kesalahan mohon koreksinya yah.... oh yah.. untuk connector lainnya juga bisa didownload disini - Code:
-
http://dev.mysql.com/downloads/connector/odbc/3.51.html
klo so nemau mo download.. datang ambe jo p qt.. coz so ada beberapa yg kita DL thanx.... thanxto:copyninja | |
| | | foreigner Moderator
Number of posts : 74 Age : 43 Location : Abepura, Jayapura, ID Points : 26 Registration date : 2008-06-07
| Subject: Re: Cara mengkoneksikan VB.net ato VB6 ke MySQL Sun Oct 05, 2008 10:03 am | |
| contoh diatas menggunakan ODBC connection, ada contoh lainnya adalah menggunakan Mysql .NET Connection API yang bisa di download pada website mysql.com download versi yg tidak perlu diisntal, agar lebih mudah penggunaanya, anda hanya menambah reference file dll tersebut pada project anda saat membuat aplikasi database menggunakan VB.NET, maka anda siap menggunakan class2 yang telah mereka buat | |
| | | CLiFF Administrator
Number of posts : 564 Age : 38 Location : Anywhere... Points : 10009 Registration date : 2008-06-03
| Subject: Re: Cara mengkoneksikan VB.net ato VB6 ke MySQL Wed Oct 08, 2008 7:10 pm | |
| om foreigner... kalo boleh post step by step nya... biar yang bru mo blajar.. cepat mengertinya.... thanx yah... | |
| | | foreigner Moderator
Number of posts : 74 Age : 43 Location : Abepura, Jayapura, ID Points : 26 Registration date : 2008-06-07
| Subject: Re: Cara mengkoneksikan VB.net ato VB6 ke MySQL Wed Oct 08, 2008 9:29 pm | |
| - cliff wrote:
- om foreigner... kalo boleh post step by step nya... biar yang bru mo blajar.. cepat mengertinya.... thanx yah...
siipp... cuma blum dpt d p contoh yang agak simpel, sementara dicari, kalau ingin cari sendiri, kunjungi aja website www.planetsourcecode.com, or www.codeproject.com semua lengkap ada disitu. semoga sukses | |
| | | Sponsored content
| Subject: Re: Cara mengkoneksikan VB.net ato VB6 ke MySQL | |
| |
| | | | Cara mengkoneksikan VB.net ato VB6 ke MySQL | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| May 2024 | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
---|
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | Calendar |
|
Social bookmarking |
Bookmark and share the address of UNKLAB FORUM on your social bookmarking website |
|
Visitors | |
|