MysqlConnection is not defined

C

Chris

Hi,

I need to access data from Mysql database with asp.net 2.0.
I installed the Mysql/Connector Net 1.1.
I did this:
<%@ Page Language="VB" debug="true" %>
<%@ Import Namespace = "System.Data" %>
<%@ Import Namespace = "MySql.Data.MySqlClient" %>
<script language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)

Dim myConnection As MySqlConnection
....

This gives an error: "MysqlConnection is not defined"

Any idea how to solve this?
Thanks
Chris
 
C

Cowboy \(Gregory A. Beamer\)

First, you need a project reference, which will solve this issue. Second,
you really should code in a Code Behind (Code Beside for 2.0) file instead
of embedded in the page, as it fosters separation of code and UI>

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
C

Chris

Thanks both for replying.
I already use code-behind, but for keeping it simple here, i put it in one
file.

But, sorry if it"s stupid, what do you mean with "you need a project
reference"?
 
C

Chris

I'm working with VWD, and there, in my project, i did: Add reference.
In the window, i can see a lot of things, but nothing about Mysql ....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top