Connecting to mysql by:dennis.claes@skynet-dot-be.no-spam.invalid (s5034454)
|
Hello, I'm trying to connect to a mysql database. I have already taken these steps: 1) downloaded and installed odbc_net.msi 2) downloaded and installed mdac_typ.exe (mdac 2.7 or something) 3) written this code:
Imports System.Data.Odbc.OdbcConnection
Public Class Test Inherits System.Windows.Forms.Form
+ windows form designer generated code
Private Sub Test_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim MyConString As String = "DRIVER={MySQL ODBC 3.51 Driver};" & _ "SERVER=db.pcextreme.nl;" & _ "DATABASE=test;" & _ "UID=root;" & _ "PASSWORD=pass;" & _ "OPTION=3" Dim MyConnection As New System.Data.Odbc.OdbcConnection(MyConString)
MyConnection.Open() End Sub End Class
But VB.NET doesn't recognize the namespace and I can't find it in the "add reference" list. Could anyone help me?
|
| | Reply: by:Ken Tucker [MVP]
|
| | Hi,
Framework version 10 use Imports Microsoft.Data.Odbc
Framework version 1.1 use Imports System.Data.Odbc
Ken
|
| | Reply: by:hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])
|
| | <URL:http://www.connectionstrings.com/>
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
|
0 Comments:
Post a Comment
<< Home