not work(MS SQL)

Results 1 to 2 of 2

Thread: not work(MS SQL)

  1. #1
    rdy Guest

    Default not work(MS SQL)

    I want to use the following to open the recordset,but I received the "error asp 0115".The database I used is MS SQL.Can anyone give me a hand? Thank you!<BR>&#060;%<BR>set conn=server.createobject("adodb.connection")<BR>se t rs=server.createobject("adodb.recordset")<BR>conn. open "dsn=sql7;uid=dd;pwd=debin"<BR>sql="select * from klgl"<BR> sql,conn,1,1<BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: not work(MS SQL)

    Try it with this code:<BR><BR>&#060;%<BR>set conn=server.createobject("adodb.connection")<BR>Se t SQLStmt = Server.CreateObject("ADODB.Command")<BR>set rs=server.createobject("adodb.recordset")<BR>conn. open "[DatabaseName]"<BR>SQLStmt.CommandText="select * from klgl"<BR>SQLStmt.CommandType = 1<BR>Set SQLStmt.ActiveConnection = conn<BR> SQLStmt<BR>%&#062;<BR><BR>I hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts