Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP error when connecting to db 1

Status
Not open for further replies.

chappi

Technical User
Aug 29, 2001
42
0
0
US
Hi all.

I have come across an error and it's making me pull out my hair (pretty soon I'll be bald and not fun to look at -- or will I?)...

Anyways, the only response I'm getting from IE is:
Code:
Error Type:
(0x80004005)
Unspecified error

When trying to get more info through the ASP error handling, all I'm getting is:
Code:
Error Number : -2147467259
Source : 
Description :

So, there is not much for me to go start from.

Here is the connection string:
Code:
mySQL = SELECT * FROM categories, types, mediums, items WHERE mediums.medium LIKE '%test%' OR categories.category LIKE '%test%' OR types.type LIKE '%test%' OR first_name LIKE '%test%' OR last_name LIKE '%test%' OR nationality LIKE '%test%' OR provenance LIKE '%test%' OR markings LIKE '%test%' OR intro LIKE '%test%' OR title LIKE '%test%' OR size LIKE '%test%' AND (categories.id=categorie AND mediums.id=items.medium AND types.id=items.type)

dbConx = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("dbase/dbGMS.mdb") & ";"

set dbRS = Server.CreateObject("ADODB.Recordset")

dbRS.Open dbSQL, dbConx, adOpenKeyset, adLockPessimistic, adCmdText

My guess is that it has something to do with the query, just can't figure out what. When I use a simple query with just one table and one or two fields, everything works great.

I've been looking for help for hours now and can't seem to find anything. If anyone has seen this and has a solution, please let me know so I can stop pulling my hair out (-:

Thanks.
Jeannette
 
One thing I've just noticed, in the last CODE section, the SQL statement variable is actually dbSQL, not mySQL...

Thanks.
 
may be size is a reserved word...

try wrapping it in [] like....[size]

-L
 
Thanks Lothario! That's exactly it!!!

[sunshine]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top