Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
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
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()
MySQLDataGrid.DataSource = myDataSet
<title>Simple MySQL Database Query</title>
<asp:DataGrid id="MySQLDataGrid" runat="server" />
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?