PDA

Просмотр полной версии : Asp mssql оболочка!


pharm_all
07.12.2009, 13:48
народ может у кого есть Asp скрипт для работы в Mssql по типу как для Mysql на php . Очень нужно .
или шелл с такой возможностью но 100% рабочий на asp!!!

xena-mil1
12.12.2009, 05:25
<html>
<title>Queries from the MS-SQL database with ASP</title>
<body bgcolor="FFFFFF">
<h2>Query from table <b>products</b> with ASP</h2>

<%

Set conn = Server.CreateObject("ADODB.Connection")
conn.open "PROVIDER=SQLOLEDB;UID=user;PWD=pass;DATABASE=pubs"

'This code block will create a recordset
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select * from testTisch"
rs.open SQL, conn

'will iterate to display the records got from the database
While Not rs.EOF
response.write(rs("testColEin") & " " & rs("testColZwei"))
rs.MoveNext
Wend

'closes the connection
rs.close
conn.close
Set rs = Nothing
Set conn = Nothing

%>
</body>
</html>