[Microsoft][ODBC 驱动程序管理器] 驱动程序的 SQLSetConnectAttr 失败
我到底差不出来是什么原因!。。。。
一直郁闷中。。。。
<%
set conn = server.CreateObject("ADODB.connection")
conn.Open application("dsn")
'set rs = conn.Execute("exec sp_js99")
set rs = server.CreateObject("ADODB.recordset")
rs.Open "select num as no,score1 as s1,score2 as s2,score3 as s3,score4 as s4,score5 as s5 from student order by num",conn
%>
数据库连接:
dim conn,connstr,dbpath
'更改数据库名字
dbpath="newdata.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
c & Server.MapPath(dbpath)
<%
set conn = server.CreateObject("ADODB.connection")
conn.Open application("dsn")
'set rs = conn.Execute("exec sp_js99")
set rs = server.CreateObject("ADODB.recordset")
rs.Open "select num as no,score1 as s1,score2 as s2,score3 as s3,score4 as s4,score5 as s5 from student order by num",conn
%>
数据库连接:
dim conn,connstr,dbpath
'更改数据库名字
dbpath="newdata.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
c & Server.MapPath(dbpath)
楼主使的是dns(数据源)的方式连接数据库?
不过执行存储过程的话记得还有一个ADODB.Command对象专门执行存储过程。