opensubscriber
   Find in this group all groups
 
Unknown more information…

d : dotnet@lists.mysql.com 8 October 2005 • 2:10AM -0400

Problem connecting to mysql
by Anthony Liu

REPLY TO AUTHOR
 
REPLY TO GROUP



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
"mysql-connector-net-1.0.6-noinstall.zip" 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
MySqlConnection("Database=test;Data
Source=1.2.3.4;User Id=myself;Password=mypassword"

    strSQL = "SELECT * FROM testtable;"

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

    MySQLDataGrid.DataSource = myDataSet
    MySQLDataGrid.DataBind()

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
http://mail.yahoo.com

--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=subscriber@open...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

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