Mysql 如何在vbscript中检索列值
我想从mysql数据库表中检索列值(登录名、密码)到vbscript。我该怎么做?我没有vbscript的经验,我必须把它作为我项目的一部分。我成功地连接到Mysql数据库表,但我不知道如何在vbscript中检索这些列值(两者都在varchar中)。我在谷歌上搜索了很多,但没有得到任何帮助。有人能帮我吗?这是ASP中的一个示例,它可以帮助您找到需要去的地方。注意:这将为您提供一个断开连接的记录集,这是首选方法,因为它会尽快将db连接释放回池:Mysql 如何在vbscript中检索列值,mysql,vbscript,Mysql,Vbscript,我想从mysql数据库表中检索列值(登录名、密码)到vbscript。我该怎么做?我没有vbscript的经验,我必须把它作为我项目的一部分。我成功地连接到Mysql数据库表,但我不知道如何在vbscript中检索这些列值(两者都在varchar中)。我在谷歌上搜索了很多,但没有得到任何帮助。有人能帮我吗?这是ASP中的一个示例,它可以帮助您找到需要去的地方。注意:这将为您提供一个断开连接的记录集,这是首选方法,因为它会尽快将db连接释放回池: <%@Language="VBScript"
<%@Language="VBScript"%>
<!-- Include file for VBScript ADO Constants -->
<!--#include File="adovbs.inc"-->
<%
' Connection string.
strCon = "Provider=sqloledb;Data Source=myServer;Initial Catalog=Northwind;User Id=myUser;Password=myPassword"
' Create the required ADO objects.
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.recordset")
' Open the connection.
conn.Open strCon
' Retrieve some records.
strSQL = "Select * from Shippers"
rs.CursorLocation = adUseClient
rs.Open strSQL, conn, adOpenStatic, adLockOptimistic
' Disconnect the recordset.
Set rs.ActiveConnection = Nothing
' Release the connection.
conn.Close
' Check the status of the connection.
Response.Write("<BR> Connection.State = " & conn.State)
Set conn = Nothing
' Use the diconnected recordset here.
Response.Write("Column1")
Response.Write("Column2")
' Release the recordset.
rs.Close
Set rs = Nothing
%>
这个问题的答案是“我帮你找到你需要的地方”你能展示你成功连接到MySql的代码吗?