Hi, I’m hoping someone can help me.
I have an ASP.net website posted to a domain I purchased on domain.com
Domain.com also provides me with the ability to create databases with SQL.
I’ve created a database called db_Main which contains a table called MainTable.
I need to know how to connect to this database so that I can display the records on my website, and eventually allow users to add additional records to the database from my website.
Domain.com provides the following code to connect to the database, I’m not sure where I put this though. Can someone help me?
’ Code for ODBC 3.51
’ Start
<%
Dim ConnectionString
ConnectionString=“DRIVER={MySQL ODBC 3.51 Driver}; SERVER=MyServerAddress(not posting it here); PORT=#### (they provide the number not posting it here);” &_
“DATABASE=db_main; USER=MyUserName(not posting it here); PASSWORD=(the password, not posting it here); OPTION=3;”
%>
’ End
’ Code for ODBC 5.1
’ Start
<%
Dim ConnectionString
ConnectionString=“DRIVER={MySQL ODBC 5.1 Driver}; SERVER='MyServerAddress(not posting it here); PORT=#### (they provide the number not posting it here);” &_
“DATABASE=db_main; USER=MyUserName(not posting it here); PASSWORD=(the password, not posting it here); OPTION=3;”
%>
’ End