Results 1 to 3 of 3

Thread: Problem with latest download

  1. #1
    Mark Ream Guest

    Problem with latest download

    I have been using a version from August and downloaded the latest version on 10-05-98. I installed it and registered it. Everything appears to work fine except it gives me an error and will not display. The error has to do with "TOPSQL=Select TOP 5 * from assignments" which causes a SQL error. How do I get it not to do this?


    Mark Ream

    UserQstr: aspdebug=2
    Main: Q=..U=..V=..W=..UE=..US=
    New session: SQL=Select * from assignments
    OptFd=,
    heading=
    ConnectTimeOut=30
    CloseConnection=True
    GridInitSortDESC=False
    EasyFilterText=True
    UseRSFilter=False
    SelectFrom=True
    Alive=True
    Get Connection: NewSession=True
    Get_Connection: New connection
    New conn Exit
    Main: New session
    Filter_startup
    EasyFilterText = True
    Filter_setup: entering - FilterFlds=as_username,as_class, as_date_assign, as_date_due, heading=

    Enter Your Choices.

    Get_RS: Entering mode=grid
    Get_RS: SQL before stuff SQL =Select * from assignments
    Get_RS: SQL after stuff SQL =Select * from assignments
    Get_RS: Newsession
    SQ=SELECT count(*) as c from assignments

    No filter count=11
    Count=11
    TOPSQL=Select TOP 5 * from assignments
    Get_RS_open SQL=Select TOP 5 * from assignments

    Microsoft OLE DB Provider for ODBC Drivers error `80040e14`

    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near `5`.

    /aspjobs/asp/fassign1.asp, line 81

  2. #2
    Stephen Wynkoop Guest

    Problem with latest download (reply)

    Are you using SQL 7? If not, TOP is not supported. If you`re looking to pull back only 5 rows (from your example) and are using SQL 6.5, it may be easiest to either set dbGridInc to show 5 rows at a time, or you can call a stored procedure that uses SET ROWCOUNT 5 to limit results.

    Of course all of this is moot if you`re using SQL 7. <g>

    Hope this helps!

    SW

    On 10/5/98 4:32:03 AM, Mark Ream wrote:
    > I have been using a version from August and downloaded the latest version
    > on 10-05-98. I installed it and registered it. Everything appears to work
    > fine except it gives me an error and will not display. The error has to do
    > with "TOPSQL=Select TOP 5 * from assignments" which causes a SQL error. How
    > do I get it not to do this?


    Mark Ream

    UserQstr: aspdebug=2
    Main:
    > Q=..U=..V=..W=..UE=..US=
    New session: SQL=Select * from
    > assignments
    OptFd=,
    heading=
    ConnectTimeOut=30
    CloseConnection=True
    Gri
    > dInitSortDESC=False
    EasyFilterText=True
    UseRSFilter=False
    SelectFrom=True
    >
    Alive=True
    Get Connection: NewSession=True
    Get_Connection: New
    > connection
    New conn Exit
    Main: New
    > session
    Filter_startup
    EasyFilterText = True
    Filter_setup: entering -
    > FilterFlds=as_username,as_class, as_date_assign, as_date_due,
    > heading=

    Enter Your Choices.

    Get_RS: Entering mode=grid
    Get_RS: SQL
    > before stuff SQL =Select * from assignments
    Get_RS: SQL after stuff SQL
    > =Select * from assignments
    Get_RS: Newsession
    SQ=SELECT count(*) as c
    > from assignments

    No filter count=11
    Count=11
    TOPSQL=Select TOP 5 *
    > from assignments
    Get_RS_open SQL=Select TOP 5 * from
    > assignments

    Microsoft OLE DB Provider for ODBC Drivers error `80040e14`
    >

    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
    > near `5`.

    /aspjobs/asp/fassign1.asp, line 81

  3. #3
    John Guest

    Problem with latest download (reply)

    Hi Mark,

    The latest version uses the TOP N syntax for improved performance when applicable. Just add the following line to your program and it should be all set:

    MyDb.dbOptions = "datewrap=`"

    If you already have a dbOptions, just append this to the current string (put a comma in front of it).

    The problem comes with "auto-detecting" if you have an SQL Server database since we need to use a different syntax between Access and SQL Server.

    This ought to do the trick!

    John


    On 10/5/98 4:32:03 AM, Mark Ream wrote:
    > I have been using a version from August and downloaded the latest version
    > on 10-05-98. I installed it and registered it. Everything appears to work
    > fine except it gives me an error and will not display. The error has to do
    > with "TOPSQL=Select TOP 5 * from assignments" which causes a SQL error. How
    > do I get it not to do this?


    Mark Ream

    UserQstr: aspdebug=2
    Main:
    > Q=..U=..V=..W=..UE=..US=
    New session: SQL=Select * from
    > assignments
    OptFd=,
    heading=
    ConnectTimeOut=30
    CloseConnection=True
    Gri
    > dInitSortDESC=False
    EasyFilterText=True
    UseRSFilter=False
    SelectFrom=True
    >
    Alive=True
    Get Connection: NewSession=True
    Get_Connection: New
    > connection
    New conn Exit
    Main: New
    > session
    Filter_startup
    EasyFilterText = True
    Filter_setup: entering -
    > FilterFlds=as_username,as_class, as_date_assign, as_date_due,
    > heading=

    Enter Your Choices.

    Get_RS: Entering mode=grid
    Get_RS: SQL
    > before stuff SQL =Select * from assignments
    Get_RS: SQL after stuff SQL
    > =Select * from assignments
    Get_RS: Newsession
    SQ=SELECT count(*) as c
    > from assignments

    No filter count=11
    Count=11
    TOPSQL=Select TOP 5 *
    > from assignments
    Get_RS_open SQL=Select TOP 5 * from
    > assignments

    Microsoft OLE DB Provider for ODBC Drivers error `80040e14`
    >

    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
    > near `5`.

    /aspjobs/asp/fassign1.asp, line 81

Posting Permissions

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