*** all % gets an blue underline and script language
*** ----------------------------------- ***
Sub Page_Load(sender As Object, e As EventArgs)
Dim myConnection As MySqlConnection *** i get an blue underline
Dim myDataAdapter As MySqlDataAdapter *** i get an blue underline
Dim myDataSet As DataSet
Dim strSQL As String
Dim iRecordCount As Integer
myConnection = New MySqlConnection("server=localhost; user id=15secs; password=password; database=mydatabase; pooling=false;") *** mySQLConnection gets an blue underline
strSQL = "SELECT * FROM mytable;"
myDataAdapter = New MySqlDataAdapter(strSQL, myConnection) *** MySqlDataAdapter gets an blue underline
myDataSet = New Dataset()
myDataAdapter.Fill(myDataSet, "mytable")
pald
0 Points
8 Posts
HELP Please!! MySQL 5.0 Connection with ASP.NET 2003
Jan 12, 2007 01:02 AM|LINK
Ok, I'm pretty new to this.... I'm trying to connect mySql 5.0 with asp.net 2003...
i have looked at sites, on how to get this done correctly, but now having trouble.... this site is the one i followed, because it seems
simple...
http://www.15seconds.com/issue/050210.htm
I downloaded and did what all the instruction tells me to... but now when it comes to the apsx page,
I'm not sure where they all go, look for my remarks here with ***
*** I'm not sure with to put this... do i put it under my
web form designer code following be everything else?
look at the original code on the above site.
<%@ Page Language="VB" debug="true" %>
<%@ Import Namespace = "System.Data" %>
<%@ Import Namespace = "MySql.Data.MySqlClient" %>
<script language="VB" runat="server">
*** all % gets an blue underline and script language
*** ----------------------------------- ***
Sub Page_Load(sender As Object, e As EventArgs)
Dim myConnection As MySqlConnection *** i get an blue underline
Dim myDataAdapter As MySqlDataAdapter *** i get an blue underline
Dim myDataSet As DataSet
Dim strSQL As String
Dim iRecordCount As Integer
myConnection = New MySqlConnection("server=localhost; user id=15secs; password=password; database=mydatabase; pooling=false;") *** mySQLConnection gets an blue underline
strSQL = "SELECT * FROM mytable;"
myDataAdapter = New MySqlDataAdapter(strSQL, myConnection) *** MySqlDataAdapter gets an blue underline
myDataSet = New Dataset()
myDataAdapter.Fill(myDataSet, "mytable")
MySQLDataGrid.DataSource = myDataSet
MySQLDataGrid.DataBind()
End Sub
</script>
<html>
<head>
<title>Simple MySQL Database Query</title>
</head>
<body>
<form runat="server">
<asp:DataGrid id="MySQLDataGrid" runat="server" />
</form>
</body>
</html>
If anyone don't mind, can you create one and copy it on and post it up and tell me how to do it please!
I've been trying to fix it for the past couple of days....
One more question does anyone know how to use tom cat?