I am trying to connect to a remote MySQL database from Classic ASP page, when I write VBScript code in it the website is giving HTTP 500 Internal Server
Error. I checked with the host they are saying its not an error from their end.
Please help me.
<%
dim myConnection
dim connectString
username = "bla"
password = "bla"
database = "bla"
host = "bla"
Set myConnection = Server.CreateObject("ADODB.Connection")
Set RSTitleList = Server.CreateObject("ADODB.Recordset")
connectString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER="&host&"; DATABASE="&database&"; UID="&username&";PASSWORD="&password&"; OPTION=3"
**myConnection.Open connectString ---- HERE I'M GETTING ERROR. ABOVE CODE IS WORKING FINE.**
Set RSTitleList = myConnection.Execute( "Select * From questions") %>
<!-- Begin our column header row -->
<!-- Ok, let's get our data now -->
<% do while not RStitleList.EOF %>
<p> <%=RStitleList("id")%>).
<b><%=RSTitleList("question") %></b>      <%=RSTitleList("answer") %> <!--<a href="emailaddress.htm">-->More►<!--</a>--> <br>
<p>     <font color="purple"> answered by </font> <b>Sadhu</b> on 1-10-2015 </p>
</p>
<% RSTitleList.MoveNext%>
<%loop %>