Control panel
Webmail


Back

MySQL connection using .NET
MySQL connection using .NET:

There is no specific MySQL .net driver at your hosting account, so you can use the ODBC-driver from asp, or download a driver here:

Download driver:
Pick the one for your version of .net:

Download .net 1.1 version
Download .net 2.0 version

Create a folder named "[your-domain.com]\bin" on your hosting-account and upload the driver to this folder.


Connection string:
Here is shown how to make a connection-string in your programming:

<%@ Import Namespace = "MySql.Data.MySqlClient" %>
<%@ import namespace = "system.data.oledb" %>

<%
Dim conn As New MySql.Data.MySqlClient.MySqlConnection
Dim myConnectionString as String

myConnectionString = "server=db.[your-domain.com];" _
& "uid=[your-customernumber];" _
& "pwd=[your-password];" _
& "database=[your-customernumber];"

Try
conn.ConnectionString = myConnectionString
conn.Open()

Catch ex As MySql.Data.MySqlClient.MySqlException
response.write (ex.Message)
End Try
%>