|
 |
asp_databases thread: 80004005 stumper...
Message #1 by "Philhouse" <spam@t...> on Tue, 4 Feb 2003 05:35:28
|
|
I've been having some problems connecting to an Access 2000 db using
OLEDB... surprise, surprise. The strange part is the way the error is
occuring.
This is my code:
Const CONNECTION_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\inetpub\wwwroot\shelter\db\shelter.mdb"
set oConn = Server.CreateObject("adodb.connection")
set oRS = Server.CreateObject("adodb.recordset")
oConn.Open CONNECTION_STRING
sSQL = "
SELECT
COUNT(at.animal_type_id) AS total, at.desc_tx
FROM ((defn_animal_type_tb AS at
LEFT JOIN defn_breed_tb AS b ON at.animal_type_id=b.animal_type_id)
LEFT JOIN data_animal_tb AS a ON b.breed_id=a.breed_id)
WHERE
a.active_fl=1
AND a.adopted_fl=0
GROUP BY
at.desc_tx
ORDER BY
at.desc_tx"
oRS.Open sSQL, oConn, adOpenForwardOnly, adLockReadOnly
This statement gives an "Error Type: (0x80004005) Unspecified error."
If I change the SQL statement to only touch ONE table, however, I can get
as much data as I like -- it works fine. I can also put this SQL
statement into Access as a query and select the data from it like that.
Unfortunately, this needs to be dynamically built, so that isn't really a
good solutions.
Any ideas would be appreciated.
Thanks,
Phil
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 4 Feb 2003 19:03:29 +1100
|
|
Have you tried applying the latest Jet Service Pack?
http://support.microsoft.com/default.aspx?scid=kb;en-us;282010&
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Philhouse" <spam@t...>
Subject: [asp_databases] 80004005 stumper...
: I've been having some problems connecting to an Access 2000 db using
: OLEDB... surprise, surprise. The strange part is the way the error is
: occuring.
:
: This is my code:
:
: Const CONNECTION_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data
: Source=c:\inetpub\wwwroot\shelter\db\shelter.mdb"
:
: set oConn = Server.CreateObject("adodb.connection")
: set oRS = Server.CreateObject("adodb.recordset")
: oConn.Open CONNECTION_STRING
:
: sSQL = "
: SELECT
: COUNT(at.animal_type_id) AS total, at.desc_tx
: FROM ((defn_animal_type_tb AS at
: LEFT JOIN defn_breed_tb AS b ON at.animal_type_id=b.animal_type_id)
: LEFT JOIN data_animal_tb AS a ON b.breed_id=a.breed_id)
: WHERE
: a.active_fl=1
: AND a.adopted_fl=0
: GROUP BY
: at.desc_tx
: ORDER BY
: at.desc_tx"
:
: oRS.Open sSQL, oConn, adOpenForwardOnly, adLockReadOnly
:
: This statement gives an "Error Type: (0x80004005) Unspecified error."
:
: If I change the SQL statement to only touch ONE table, however, I can get
: as much data as I like -- it works fine. I can also put this SQL
: statement into Access as a query and select the data from it like that.
: Unfortunately, this needs to be dynamically built, so that isn't really a
: good solutions.
:
: Any ideas would be appreciated.
|
|
 |