CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: ADO in ASP

  1. #1
    Guest

    ADO in ASP

    i tried to connect my program in an ASP page to SQL server reside on a server.. but the below error occur.. anyone have any idea about it?

    ===============================================================================
    ADODB.Connection error '800a0bb9'

    The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another
    ===============================================================================


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: ADO in ASP

    post the offending code.
    did you #include adovbs.inc?


  3. #3
    Guest

    Re: ADO in ASP

    This is because any variables declared are not matching the fields types in the SQL database.
    Declare option explicit also to force all variable to be explicitly initialised. Otherwise inadvertant declaration/initialisation of variables may result in mismatch


  4. #4
    Guest

    Re: ADO in ASP

    i'm using data environment to set up the connection... but this connection work for html page... not ASP.. that's weird... the following code with '*' is where the error occur.....



    <SCRIPT LANGUAGE="JavaScript" RUNAT="server">
    function _initRecordset1()
    {
    var DBConn = Server.CreateObject('ADODB.Connection');
    DBConn.ConnectionTimeout = Application('SS_ConnectionTimeout');
    DBConn.CommandTimeout = Application('SS_CommandTimeout');
    DBConn.CursorLocation = Application('SS_CursorLocation');
    * DBConn.Open(Application('SS_ConnectionString'), Application('SS_RuntimeUserName'), Application('SS_RuntimePassword'));
    var cmdTmp = Server.CreateObject('ADODB.Command');
    var rsTmp = Server.CreateObject('ADODB.Recordset');
    cmdTmp.ActiveConnection = DBConn;
    rsTmp.Source = cmdTmp;
    cmdTmp.CommandType = 2;
    cmdTmp.CommandTimeout = 10;
    cmdTmp.CommandText = '"employee"';
    rsTmp.CacheSize = 10;
    rsTmp.CursorType = 3;
    rsTmp.CursorLocation = 3;
    rsTmp.LockType = 3;
    Recordset1.setRecordSource(rsTmp);
    Recordset1.open();
    if (thisPage.getState('pb_Recordset1') != null)
    Recordset1.setBookmark(thisPage.getState('pb_Recordset1'));
    }
    function _Recordset1_ctor()
    {
    CreateRecordset('Recordset1', _initRecordset1, null);
    }
    function _Recordset1_dtor()
    {
    Recordset1._preserveState();
    thisPage.setState('pb_Recordset1', Recordset1.getBookmark());
    }


  5. #5
    Join Date
    May 1999
    Posts
    3,332

    Re: ADO in ASP

    check the values of your application variables using response.write.
    Did you define an Application for your ASP in IIS?
    If not, there won't be any application variables!


  6. #6
    Guest

    Re: ADO in ASP

    i tried it.. nothing happen... means that there's no application variable....

    but why if i compose an ASP page using interdev on the server, it works...
    when it comes to ASP page compose at client side using interdev, it didn't works....

    any idea???


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured