Ask a Question related to ASP Database, Design and Development.
-
S N #1
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
-
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...? -
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... -
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... -
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... -
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 ... -
Bob Barrows [MVP] #2
Re: Problem with OLEDB over ODBC
S N wrote:
You've used reserved keywords for column names (number, text, and maybe> 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")
>
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
-
S N #3
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...them> 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[]> 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
-
Egbert Nierop \(MVP for IIS\) #4
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...gives> it works when i surround all the fields with [].
> but when i surround all fields except the field name zone with [], itget> 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'tbrackets> them> > the same error when running with ODBC.
> >
> > My suggestion is to change these column names, but, if you can't change> > for some reason, you will need to remember to surround them withare> []> > 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>> > 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



Reply With Quote

