Link to home
Start Free TrialLog in
Avatar of bazbazbaz
bazbazbaz

asked on

How to solve Provider error '80004005' Unspecified error problem

Hi,

My SQL query gives the error Provider error '80004005' Unspecified error problem when I try to run it:

AppRS.open SQLstr, AppDBcn

AppDBcn is to an Oracle DB.

The SQLStr is:
select * from mars_etl.etl_job_history_detail
where duration is null

The strange thing is it works from PL SQL developer. And I have other SQL to that DB and it works fine. I changed the table name and it worked ok - so it's just a problem with that table - mars_etl.etl_job_history_detail.

I've look up this error on google, and the best solution seems http://support.microsoft.com/kb/251254 but i'm not sure.
 Any help much appreciated
Thanks in advance
Avatar of kevp75
kevp75
Flag of United States of America image

full code please
the following article may help:

http://tutorials.aspfaq.com/8000xxxxx-errors/80004005-errors.html

once there search the page for "unspecified error".  Though this article pertains to Access it may give some insight as to what the error message is telling you.
Avatar of joeposter649
joeposter649

Make sure the db user in your connection string has access to mars_etl.etl_job_history_detail.
Avatar of bazbazbaz

ASKER

ConnectionStr = "DRIVER={Microsoft ODBC for Oracle};SERVER=F300str_integ.WORLD;UID=..;PWD=..;" username & password are filled in in actual code
set AppDBcn=server.CreateObject("ADODB.Connection")
Server.ScriptTimeOut =100000
set AppRS = server.CreateObject("ADODB.Recordset")
AppDBcn.open ConnectionStr


SQLstr = "select count(*) from mars_etl.etl_object_s EO"
Set AppRS= AppDBcn.Execute(SQLstr)
AppRS.close
Response.write("All ok 1")

SQLstr = "select * from mars_etl.etl_job_history_detail where duration is null  and begin_range >  sysdate - 1/4  order by start_time desc"
Set AppRS= AppDBcn.Execute(SQLstr)
AppRS.close
Response.write("All ok 2")
--------------------------------------------------------------------------
Result:

All ok 1
Provider error '80004005'

Unspecified error

/sanity/Show_Check.asp, line 68 ''''''the second Set AppRS= AppDBcn.Execute(SQLstr)
 line

Cant understand why it's working for one SQL and not another. Username and password give same access to both tables, and both queries work in PL SQL developer.

Thanks


i found another article that pertains to Oracle connection strings, default limitations, and attributes that can be set to override the default limitations.  Maybe it will help you out?

http://www.stanford.edu/dept/itss/docs/oracle/10g/win.101/b10115/using.htm
why is it working in PL SQL developer and not in the code?

Also, why does one SQL work and not the other, even though the username and password has same access to all tables??
I looked at that article, but it isnt specific really - thanks though.

Also, it said for connection use:
Dim con As New ADODB.Connection
con.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=MyOraDb;" & _
                     "User ID=scott;Password=tiger;"

but i use Microsoft ODBC for Oracle: DRIVER={Microsoft ODBC for Oracle};SERVER=....WORLD;UID=...;PWD=...;

Any help please??
When you run it in PL/SQL are  you using scott as the user?  Perhaps there is security preventing the second asp query from access the columns in the where clause.
Also, make sure there are no clobs or blobs since the microsoft driver doesn't support them.
When i run it in PL/SQL developer I log on using the same username & password that I specofy in the connection string in the code.

There cant be a security issue if it works in PL/SQL, can there??
If there were clobs/blobs would it work in PL/SQL?
<<There cant be a security issue if it works in PL/SQL, can there?>>
Probably not.

<<If there were clobs/blobs would it work in PL/SQL?>>
I'm not sure

Is there too much data to try adding a little to the query gradually until it fails?
select * from mars_etl.etl_job_history_detail
select * from mars_etl.etl_job_history_detail where duration is null
select * from mars_etl.etl_job_history_detail where duration is null  and begin_range >  sysdate - 1/4
select * from mars_etl.etl_job_history_detail where duration is null  and begin_range >  sysdate - 1/4  order by start_time desc


You might also try some brackets around the sysdate...
(sysdate -1)/4
or is it
(sysdate - (1/4))
Hi

I had tried select * from mars_etl.etl_job_history_detail, and it still failed. There is another ASP page that uses the same query but uses it inside an outer select count(*) from (select * from mars_etl.etl_job_history_detail ......

That might help.

Maybe I'll try saying select * from (select * from mars_etl.etl_job_history_detail......)

Thanks
select count(*) from (select * from mars_etl.etl_job_history_detail ..... works but

select * from (select * from mars_etl.etl_job_history_detail .... doesnt work... very strange..
ASKER CERTIFIED SOLUTION
Avatar of joeposter649
joeposter649

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That worked - thanks a million. It was one of the felds that was causing the problem: start_time. It wasnt used in the result of the query except for ORDER BY, so I selected all fields, except that one, and took out the order by.

Do you know why start_time would have caused a problem? It seems to have longer time values than other date/time fields, i.e. 04-SEP-06 10:56:04.30100005, SEP-06 02:21:06.067000

other date/time fields have values: 05/09/2006 02:21:57, 05/09/2006 02:23:32. they dont have the big long number at the end???

Thanks again.