Problem with OLEDB over ODBC

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Problem with OLEDB over ODBC

    I have an asp page used to access data from an access database.
    When I use the following as connection string (OLEDB)
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbname.mdb;Persist Security
    Info=False" to run the following sql string given below the following error
    occurs-
    Error Type:
    (0x80004005)
    Unspecified error

    The error occured when i run
    set myrs=conn.execute("select TOP 10 number,headline,zone,intro,text,file
    from news order by number DESC")

    However this error does not occur when i use (using the same connection
    string)
    set myrs=conn.execute("select * from news")

    Please note that text is a memo field.

    The same error does not occur when i use
    "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath(database)"

    as the connection string. This connection string runs for both the types of
    sql strings as mentioned above.

    Please help.


    S N Guest

  2. Similar Questions and Discussions

    1. SQL Server - OLEDB or ODBC connection
      What are the advantages/disadvantages between selecting an ODBC and an OLEDB connection between MX and a SQL Server 2000 db...?
    2. Definite difference between using OLEDB and ODBC as the driver
      Hi All Some of you may not remember (or even care for that matter ;0)), but I mentioned in a previous post that I had difficulty using the OLEDB...
    3. CREATE DATABASE via ADO/OLEDB/ODBC
      Hello everybody, Is it possible to do a CREATE DATABASE via ADO using IFX OLEDB or IFX ODBC ?, apparently there is a connection string parameter...
    4. Error with ASP.NET opening OleDb/ODBC database
      Hi there, I got a problem using an MS Access database through ASP.NET. After updating my system from .NET Framework 1.0 to 1.1, my existing...
    5. Connection string - ODBC vs OLEDB and Unspecified Error
      This one has me stumped and I was wondering if anyone might have a solution... Using this connection string ...
  3. #2

    Default Re: Problem with OLEDB over ODBC

    S N wrote:
    > I have an asp page used to access data from an access database.
    > When I use the following as connection string (OLEDB)
    > "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbname.mdb;Persist
    > Security Info=False" to run the following sql string given below the
    > following error occurs-
    > Error Type:
    > (0x80004005)
    > Unspecified error
    >
    > The error occured when i run
    > set myrs=conn.execute("select TOP 10
    > number,headline,zone,intro,text,file from news order by number DESC")
    >
    You've used reserved keywords for column names (number, text, and maybe
    file). the list of reserved keywords can be found here:
    [url]http://www.aspfaq.com/show.asp?id=2080[/url]

    A couple of these are ODBC keywords, so I'm surprised that you didn't get
    the same error when running with ODBC.

    My suggestion is to change these column names, but, if you can't change them
    for some reason, you will need to remember to surround them with brackets []
    when using them in queries run via ADO

    "select TOP 10 [number], ...

    This tells the parser to ignore the words and assume you know what you are
    doing. :-)

    HTH,
    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows [MVP] Guest

  4. #3

    Default Re: Problem with OLEDB over ODBC

    it works when i surround all the fields with [].
    but when i surround all fields except the field name zone with [], it gives
    the same error.however if i enclose only zone with [] the error goes
    what is so special with the field zone?


    "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:uvCYjK5MEHA.2468@TK2MSFTNGP11.phx.gbl...
    > S N wrote:
    > > I have an asp page used to access data from an access database.
    > > When I use the following as connection string (OLEDB)
    > > "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbname.mdb;Persist
    > > Security Info=False" to run the following sql string given below the
    > > following error occurs-
    > > Error Type:
    > > (0x80004005)
    > > Unspecified error
    > >
    > > The error occured when i run
    > > set myrs=conn.execute("select TOP 10
    > > number,headline,zone,intro,text,file from news order by number DESC")
    > >
    >
    > You've used reserved keywords for column names (number, text, and maybe
    > file). the list of reserved keywords can be found here:
    > [url]http://www.aspfaq.com/show.asp?id=2080[/url]
    >
    > A couple of these are ODBC keywords, so I'm surprised that you didn't get
    > the same error when running with ODBC.
    >
    > My suggestion is to change these column names, but, if you can't change
    them
    > for some reason, you will need to remember to surround them with brackets
    []
    > when using them in queries run via ADO
    >
    > "select TOP 10 [number], ...
    >
    > This tells the parser to ignore the words and assume you know what you are
    > doing. :-)
    >
    > HTH,
    > Bob Barrows
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >

    S N Guest

  5. #4

    Default Re: Problem with OLEDB over ODBC

    [url]http://support.microsoft.com/?id=235515[/url]

    --
    compatible web farm Session replacement for Asp and Asp.Net
    [url]http://www.nieropwebconsult.nl/asp_session_manager.htm[/url]

    "S N" <uandme72@yahoo.com> wrote in message
    news:%239ft%23X6MEHA.2244@tk2msftngp13.phx.gbl...
    > it works when i surround all the fields with [].
    > but when i surround all fields except the field name zone with [], it
    gives
    > the same error.however if i enclose only zone with [] the error goes
    > what is so special with the field zone?
    >
    >
    > "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    > news:uvCYjK5MEHA.2468@TK2MSFTNGP11.phx.gbl...
    > > S N wrote:
    > > > I have an asp page used to access data from an access database.
    > > > When I use the following as connection string (OLEDB)
    > > > "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbname.mdb;Persist
    > > > Security Info=False" to run the following sql string given below the
    > > > following error occurs-
    > > > Error Type:
    > > > (0x80004005)
    > > > Unspecified error
    > > >
    > > > The error occured when i run
    > > > set myrs=conn.execute("select TOP 10
    > > > number,headline,zone,intro,text,file from news order by number DESC")
    > > >
    > >
    > > You've used reserved keywords for column names (number, text, and maybe
    > > file). the list of reserved keywords can be found here:
    > > [url]http://www.aspfaq.com/show.asp?id=2080[/url]
    > >
    > > A couple of these are ODBC keywords, so I'm surprised that you didn't
    get
    > > the same error when running with ODBC.
    > >
    > > My suggestion is to change these column names, but, if you can't change
    > them
    > > for some reason, you will need to remember to surround them with
    brackets
    > []
    > > when using them in queries run via ADO
    > >
    > > "select TOP 10 [number], ...
    > >
    > > This tells the parser to ignore the words and assume you know what you
    are
    > > doing. :-)
    > >
    > > HTH,
    > > Bob Barrows
    > > --
    > > Microsoft MVP -- ASP/ASP.NET
    > > Please reply to the newsgroup. The email account listed in my From
    > > header is my spam trap, so I don't check it very often. You will get a
    > > quicker response by posting to the newsgroup.
    > >
    > >
    >
    >
    Egbert Nierop \(MVP for IIS\) Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139