当我尝试从.asp页面连接到远程mysql数据库时VBscript错误

时间:2015-11-30 06:48:18

标签: mysql vbscript asp-classic connection

当我尝试使用vbscript从.asp页面连接到远程mysql时,它给出了以下错误 **处理URL时服务器上发生错误。请联系系统管理员。 ** 请在这件事上给予我帮助。在此先感谢。

 <%
dim myConnection
dim connectString

username = "ssadhu"
password = "Jan211990"
database = "qtoa"
host = "db4free.net"

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

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>  &nbsp&nbsp&nbsp&nbsp <%=RSTitleList("answer") %> <!--<a href="emailaddress.htm">-->More&#9658;<!--</a>--> <br>
             <p>&nbsp&nbsp&nbsp&nbsp <font color="purple"> answered by </font> <b>Sadhu</b> on 1-10-2015 </p>   
    </p>


   <% RSTitleList.MoveNext%>

<%loop %>

0 个答案:

没有答案