Can't connect to mysql database from ASP.NET page.
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>
Subject
Written By
Posted
Can't connect to mysql database from ASP.NET page.
December 24, 2004 06:06AM
December 31, 2004 04:55PM
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.