how to access MDF file with ASP classic?
- From: "Bart" <b@xxxxxx>
- Date: Fri, 23 Mar 2007 09:37:16 +0100
Hi,
i have already posted this problem in an ASP newsgroup without succes, so i
try here.
I try to access within an cliassic ASP page an MDF file (newres.mdf) of sql
server express 2005 database which is located in
c:\inetpub\wwwroot\reskrosql\App_Data.
I get following error :
Provider error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done"
The code in ASP file:
--------------------
<%
set objdc = Server.CreateObject("ADODB.Connection")
objdc.Open(application("newres")) 'error line
%>
global.asa:
----------
Sub Application_OnStart
Application("newres") =
"Provider=SQLOLEDB;DATABASE=c:\inetpub\wwwroot\reskrosql\App_Data\newres.mdf;Data
Source=.\SQLEXPRESS;AttachDbFilename=c:\inetpub\wwwroot\reskrosql\App_Data\newres.mdf;Integrated
Security=True;User Instance=True"
'i also tried this:
Sub Application_OnStart
Application("newres") = "Provider=SQLOLEDB;DATABASE=newres;Data
Source=.\SQLEXPRESS;AttachDbFilename=c:\inetpub\wwwroot\reskrosql\App_Data\newres.mdf;Integrated
Security=True;User Instance=True"
End Sub
Thanks for help
Bart
.
- Prev by Date: Re: SQL Server 2000 to 2005 shows error in classic asp : Row handle referred to a deleted row or a row marked for deletion
- Next by Date: Re: ADO Bookmark status
- Previous by thread: SQL Server 2000 to 2005 shows error in classic asp : Row handle referred to a deleted row or a row marked for deletion
- Next by thread: Re: ADO Bookmark status
- Index(es):
Relevant Pages
|
|