Find in this group all groups
Unknown more information…

d : 8 October 2005 • 2:10AM -0400

Problem connecting to mysql
by Anthony Liu


Hi, I was not able to install the MySQL.Data.msi
connector for .net.  I got a 2908 error message.  Then
I downloaded the no-installer version with file name
"" and unzipped
to my hard drive.

In my aspx page, I have this:

<%@ Import Namespace = "MySql.Data.MySqlClient" %>
<script language="VB" runat="server">

Sub Page_Load(sender As Object, e As EventArgs)

    Dim myConnection  As MySqlConnection
    Dim myDataAdapter As MySqlDataAdapter
    Dim myDataSet     As DataSet

    Dim strSQL        As String
    Dim iRecordCount  As Integer

    myConnection = New
Source=;User Id=myself;Password=mypassword"

    strSQL = "SELECT * FROM testtable;"

    myDataAdapter = New MySqlDataAdapter(strSQL,
    myDataSet = New Dataset()
    myDataAdapter.Fill(myDataSet, "testtable")

    MySQLDataGrid.DataSource = myDataSet

End Sub

I get the following error message:

BC30002: Type 'MySqlConnection' is not defined.

Apparently, somehow, I have to register the .net
connector with web server.  The documentation never
tells us how to do it.  In other words, the .net
connector package was unzipped to
C:\mysql_net_connector, but how does my web
application know where it is?

I tried the 3.51 ODBC driver, too, but got the same
error message.

I keep searching google and mysql mailing list, but
could not find very helpful information.  I am at my
wits end.  Could anyone give me a hint?

Yahoo! Mail - PC Magazine Editors' Choice 2005

MySQL on .NET Mailing List
For list archives:
To unsubscribe:

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.