connection str problem [Answered]RSS

1 reply

Last post Apr 24, 2012 05:26 AM by Lloydz

  • connection str problem

    Apr 18, 2012 11:24 PM|-_-|LINK

    Set Session("conn")=Server.CreateObject("ADODB.Connection")

    session("sqlServer")="server_name"
    Session("DB_Name") = "dbName"
    Session("connStr")="Provider=SQLOLEDB;server=" + session("sqlServer") + "; database=" + session("DB_Name") +";User Id=sa;Password='user'"
        
        Session("conn").open session("connStr")
      
    if request.QueryString("action")= "search" then
    'Get User Info
    strsql="exec SearchInfo @id='" & UCASE(trim(request("txtuserid")))


    set rs1 = CreateObject("ADODB.Recordset")

    rs1.Open strsql, session("conn"), 1, 3 <---can't get record in window server 2003
    ==============================================================================


    why i always can't get any record from ASP web page. but why i exec in sql server directly, it is ok ,retruns many records.

  • Re: connection str problem

    Apr 24, 2012 05:26 AM|Lloydz|LINK

    Please do not duplicated post:

    http://forums.iis.net/t/1188792.aspx

    Please check the replies and do follow up there, thanks.