SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    May 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ADODB connection error

    Error:
    ADODB.Connection error '800a0bb9'
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
    /Carrier_Listing/Carrier_Listing_Result.asp, line 353

    function _initRecordset1()
    {
    var DBConn = Server.CreateObject('ADODB.Connection');
    DBConn.ConnectionTimeout = Application('Forecast_SQL_ConnectionTimeout');
    DBConn.CommandTimeout = Application('Forecast_SQL_CommandTimeout');
    DBConn.CursorLocation = Application('Forecast_SQL_CursorLocation'); *****************Line353**************
    DBConn.Open(Application('Forecast_SQL_ConnectionString'), Application('Forecast_SQL_RuntimeUserName'), Application('Forecast_SQL_RuntimePassword'));
    var cmdTmp = Server.CreateObject('ADODB.Command');
    var rsTmp = Server.CreateObject('ADODB.Recordset');
    cmdTmp.ActiveConnection = DBConn;
    rsTmp.Source = cmdTmp;
    cmdTmp.CommandType = 1;
    cmdTmp.CommandTimeout = 10;
    cmdTmp.Prepared = true;
    cmdTmp.CommandText = 'SELECT TERM_NBR, TERM_NAME, ADDR, CITY, CA_NBR FROM dbo.TERMINAL WHERE (TERM_NBR = 22)';
    rsTmp.CacheSize = 10;
    rsTmp.CursorType = 3;
    rsTmp.CursorLocation = 3;
    rsTmp.LockType = 1;
    Recordset1.setRecordSource(rsTmp);
    Recordset1.open();
    if (thisPage.getState('pb_Recordset1') != null)
    Recordset1.setBookmark(thisPage.getState('pb_Recordset1'));
    }
    function _Recordset1_ctor()

    Global.asa,

    Application("Forecast_SQL_ConnectionString") = "Provider=SQLOLEDB.1;Password=mister;Persist Security Info=True;User ID=userid;Initial Catalog=MISTER;Data Source=ed44-p-s03\mister;Connect Timeout=90;User Id=userid;PASSWORD=password;"
    Application("Forecast_SQL_ConnectionTimeout") = 15
    Application("Forecast_SQL_CommandTimeout") = 90
    Application("Forecast_SQL_CursorLocation") = 3
    Application("Forecast_SQL_RuntimeUserName") = "RuntimeUserName"
    Application("Forecast_SQL_RuntimePassword") = "RuntimePassword"

    Synopsis:
    I recently published w/ Front page 2003 a production web application to another windows 2003 server. Everything should mimic the production environment. When the web app tries to connect to the db the error is thrown. Any help would be greatly appreciated.
    IIS 6
    Visual Studio 6 classic asp
    Last edited by HAWK; May 27, 2010 at 12:54. Reason: Login info removed

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Are you sure that worked? I thought CursorLocation was a recordset parameter, not a connection parameter? (A quick search shows it being used for Oracle databases but not with MSSQL).

    What happens if you comment out that line?

    Have you confirmed that the Application variables are being properly recognised on the new server? (Try creating a separate ASP page to simply print their values to the screen - if they don't show correctly then there is the problem).

    PS - you might want to mask out the username and password values in this public forum.
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Member
    Join Date
    May 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ian,
    Thanks,

    Are you sure that worked? I thought CursorLocation was a recordset parameter, not a connection parameter? (A quick search shows it being used for Oracle databases but not with MSSQL).

    This code works in production...

    What happens if you comment out that line?

    It stops on the following line.

    Have you confirmed that the Application variables are being properly recognised on the new server? (Try creating a separate ASP page to simply print their values to the screen - if they don't show correctly then there is the problem).

    How do i do that?


    PS - you might want to mask out the username and password values in this public forum.

    They are...


    Thanks for your support.
    Mark

  4. #4
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    How do i do that?

    Create an ASP file called apptest.asp and upload it to your server and call it in your browser. If the resulting display doesn't show the values expected then that means your original code is not getting the values it needs.

    Code ASP:
    <%
    Response.Write "<P>" & Application("Forecast_SQL_ConnectionString") & "</P>"
    Response.Write "<P>" & Application("Forecast_SQL_ConnectionTimeout") & "</P>"
    Response.Write "<P>" & Application("Forecast_SQL_CommandTimeout") & "</P>"
    Response.Write "<P>" & Application("Forecast_SQL_CursorLocation") & "</P>"
    Response.Write "<P>" & Application("Forecast_SQL_RuntimeUserName") & "</P>"
    Response.Write "<P>" & Application("Forecast_SQL_RuntimePassword") & "</P>"
    %>
    Ian Anderson
    www.siteguru.co.uk

  5. #5
    SitePoint Member
    Join Date
    May 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ian,
    Thanks for the strategy and I must apologize for my ignorance, Iím obviously not a web programmer. I did as you suggested and found that I get no response from the global.asa when I tried your code. I can add
    Response.Write "<P>" & "test" & "</P>"
    and it displays. Any idea why I canít get the reference to the global.asa file read properly.
    Thanks again for your help.
    Mark

  6. #6
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    That sounds like something you need to take up with the admin of that web server.
    Ian Anderson
    www.siteguru.co.uk

  7. #7
    SitePoint Member
    Join Date
    May 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ian,
    Thanks for all your help. I did get the values to display from the global.asa. I commented out the lines in the global.asa where it connects to the db:
    'Set DE = Server.CreateObject("DERuntime.DERuntime")
    'Application("DE") = DE.Load(Server.MapPath("Global.ASA"), "_private/DataEnvironment/DataEnvironment.asa")

    When I remove the comments, it dies on the first line. I've come to understand that what I thought was our production environment being duplicated was wrong. It turns out one uses the standard windows server 2003 and the other is an enterprise version. I donít know if this would be an issue, but itís the current focus.

    Thanks again for your input.
    Mark

  8. #8
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    That makes sense - the new environment obviously doesn't have that object library installed.
    Ian Anderson
    www.siteguru.co.uk


Bookmarks

Posting Permissions

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