Can't connect to mysql database from ASP.NET page.
Posted by: stealth_tracker
Date: December 24, 2004 06:06AM

I am using the following code and i keep getting errors. It keeps saysing MySqlConnection is not declared. How do i declare it?
cheers.
<%@ Page Language="VB" %>
<%@ import Namespace="CoreLab.MySql" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.MySqlClient" %>
<script runat="server">

sub page_load

Dim con as string
Dim Datasource as string
Dim Database as string
Dim user as string
Dim pass as string

con = "Server=localhost;Database=project;uid=root;pwd=;"

MySqlConnection mycon = new MySqlConnection(con);
mycon.Open();

Connection Succesfull!!
end sub

</script>

Options: ReplyQuote


Subject
Written By
Posted
Can't connect to mysql database from ASP.NET page.
December 24, 2004 06:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.