Krydos Posted March 26, 2013 Share Posted March 26, 2013 Sorry for the delay in getting this posted. This is my test file that connects to MySql from .aspx and it works fine for me. Default.aspx: <%@ Page Language="VB" %> <%@ 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 Dim myDataAdapter As MySqlDataAdapter Dim myDataSet As DataSet Dim strSQL As String Dim iRecordCount As Integer myConnection = New MySqlConnection("server=johnny.heliohost.org; user id=username_database; password=********; database=username_database; pooling=false;") strSQL = "SELECT * FROM username_database.people;" myDataAdapter = New MySqlDataAdapter(strSQL, myConnection) myDataSet = New Dataset() myDataAdapter.Fill(myDataSet, "people") MySQLDataGrid.DataSource = myDataSet MySQLDataGrid.DataBind() End Sub </script> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>ASP.NET MySQL Test</title> </head> <body> <div> <form runat="server"> <asp:DataGrid id="MySQLDataGrid" runat="server" /> </form> </div> </body> </html> web.config: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <customErrors mode="Off"/> <compilation> <assemblies> <add assembly="*"/> </assemblies> </compilation> </system.web> </configuration> MySql.Data.dll:http://area51.heliohost.org/MySql.Data.dll.gz Test database: mysql> select * from people; +----+------------+-----------+ | id | first_name | last_name | +----+------------+-----------+ | 1 | Jack | Spratt | | 2 | Jill | McHill | | 3 | Joe | Schmoe | +----+------------+-----------+ 3 rows in set (0.02 sec) Link to comment Share on other sites More sharing options...
isitpossible Posted March 27, 2013 Author Share Posted March 27, 2013 Thanks, will take a look at this one. Link to comment Share on other sites More sharing options...
isitpossible Posted March 28, 2013 Author Share Posted March 28, 2013 Cannot download the MySql.Data.dll I am getting below error: This webpage is not available Link to comment Share on other sites More sharing options...
Shinryuu Posted March 28, 2013 Share Posted March 28, 2013 Johnny's apache is currently down. Link to comment Share on other sites More sharing options...
Krydos Posted March 29, 2013 Share Posted March 29, 2013 The link should be working now since Johnny is back online http://www.helionet.org/index/topic/15387-johnny-nearly-100/ Link to comment Share on other sites More sharing options...
Recommended Posts