|
-
Jan 28th, 2002, 09:40 PM
#1
Thread Starter
Hyperactive Member
No such interface supported ASP
Hi, when I try to create a connection to the database from an ASP page i get the following error
Provider (0x80004002)
No such interface supported
/includes/_Database.asp, line 22
I am just going
set oConn = Server.CreateObject("Adodb.Connection")
The strange thing is that the include file works and connects to a database perfectly when it is included in a different page.
Has anyone ever encountered this problem before?
Thanks in advance
MarkusJ
-
Jan 29th, 2002, 02:39 AM
#2
Lively Member
Euh, are the different pages on the same server?
The only thing I can think of is that the server your on doesn't allow ASP to connect to your DB.
Maybe some one else knows more about it...
-
Jan 29th, 2002, 10:07 AM
#3
Frenzied Member
Post the line after that...
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Jan 29th, 2002, 03:03 PM
#4
Thread Starter
Hyperactive Member
Hi guys,
yes, its a strange bug thats driving me nuts...
Basically, I have a database include file which I use to open a connection to the database by calling the open connection function..
Full code below:
==========================
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' function OpenDatabase opens a connection to the current
' database and returns true if the connection was successful
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function OpenDatabase
Dim sConnectionString
sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" & Server.MapPath("\_database\database.mdb") & ";" & "Jet OLEDB atabase Password =password;" & "Persist Security Info=False"
set oConn = server.CreateObject("ADODB.Connection")
oConn.Open sConnectionString
' if err.number <> 0 then
' An error has occurred therefore raise an error
call RaiseError(Request.ServerVariables("SCRIPT_NAME"), err.description)
else
OpenDatabase = true
end if
End function
==========================
This file is called by two pages, the first one works fine but the second time I call the page I get
Provider (0x80004002)
No such interface supported
/includes/_Database.asp, line 22
I close the connection and destroy the database connection object each time after I use it.
Technical info;
ASP pages are being run on Windows 2000 Professional
Thanks in advance
MarkusJ
-
Jan 29th, 2002, 03:54 PM
#5
Thread Starter
Hyperactive Member
Fixed problem..
Hi, well after going nuts, I have finally fixed the problem..
After working with SQL for so long then moving to Access for this small job I did not realise that Access did not support transaction processing.
So I had
<% @Language = VBScript transaction=required %>
as my first statement in the ASP page
I removed the transaction required part and the page worked fine...
just thought I would let you know....
Regards
MarkusJ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|