W
wzjlg
Unregistered / Unconfirmed
GUEST, unregistred user!
<%@language="JavaScript"%>
<%
var connect = Server.CreateObject( "ADODB.Connection"
);
var connString = "Driver={SQL Server};SERVER=lg/sqlexpress;UID=sa;PWD=sa-123456;DATABASE=pd";
connect.Open( connString );
%>
<%
var strSQL = "select departmentname from department ";
Record = Server.CreateObject( "ADODB.Recordset"
);
Record.Open( strSQL, connect );
while( !Record.EOF )
{
Response.Write(Record("departmentname");
Record.MoveNext();
}
Record.Close();
%>
<td>打开数据库成功!</td>
这段代码在sql2000中可以运行,但是在sql2005中就运行不了,不知道有没有知道1[?][?]
<%
var connect = Server.CreateObject( "ADODB.Connection"
);
var connString = "Driver={SQL Server};SERVER=lg/sqlexpress;UID=sa;PWD=sa-123456;DATABASE=pd";
connect.Open( connString );
%>
<%
var strSQL = "select departmentname from department ";
Record = Server.CreateObject( "ADODB.Recordset"
);
Record.Open( strSQL, connect );
while( !Record.EOF )
{
Response.Write(Record("departmentname");
Record.MoveNext();
}
Record.Close();
%>
<td>打开数据库成功!</td>
这段代码在sql2000中可以运行,但是在sql2005中就运行不了,不知道有没有知道1[?][?]