Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Connection To a password protected mdb File Help !!!(access 97)


Message #1 by "ASPy" <alakale@y...> on Mon, 30 Oct 2000 22:35:49 -0000
Hi, in this application i just tried to view a mdb(97) database file which

is password protected.(password= "12345" )

For this i used 3 files in all. 

1) users.mdb 

2) datastore.asp 

3) viewBase.asp

here are their contents of asp files:

--------------------  DataStore.asp   ---------------------



<%

   Dim strPath, pass

   strPath = Server.MapPath("users.mdb")

   pass = "12345"

   strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; password= " &  pass & _

                      ";Data Source =" & strPath & ";Persist Security

Info=False"

  

%>

--------------------  viewBase.asp   ---------------------



<!-- #include file ="DataStore.asp" -->

<%



Dim adOpenForwardOnly, adCockReadOnly, adcmdTable



adOpenForwardOnly = 0

adLockReadOnly = 1

adcmdTable = 2



Dim objConn, objRS

Set objConn = Server.CreateObject("ADODB.Connection")

Set objRS = Server.CreateObject("ADODB.RecordSet") 





objConn.Open strConnect



objRS.Open "email", objConn, adOpenForwardOnly, adLockReadOnly, adcmdTable



While Not objRS.EOF 

   Response.Write "email: " & objRS("email") & "<BR>" & _

	            "name: " & objRS("name") & "<BR>" & _	

		"sname: " & objRS("sname") & "<BR>" & _

		"msg: " & objRS("msg") & "<P>"

   objRS.MoveNext 

Wend



objRS.Close

objConn.Close

SET objRS = Nothing   

SET objConn = Nothing



%>



Error Type:

Microsoft JET Database Engine (0x80040E4D)

Cannot start your application. The workgroup information file is missing

or opened exclusively by another user.

/passbase/Connect2.asp, line 34

line 34 is the one that contains       objConn.Open strConnect







Message #2 by "Hoogwerf, Sander" <sander.hoogwerf@e...> on Tue, 31 Oct 2000 08:42:29 -0000
Try adding the systemdb for your database:



strConnect = strConnect & ";SystemDB=<yourfile>.mdw"



or



Create a ODBC User DNS and set the system database to <yourfile>.mdw and use

this DNS to connect to your database.



Sander



-----Original Message-----

From: ASPy [mailto:alakale@y...]

Sent: 31 October 2000 17:10

To: ASP Databases

Subject: [asp_databases] Connection To a password protected mdb File

Help !!!(access 97)





Hi, in this application i just tried to view a mdb(97) database file which

is password protected.(password= "12345" )

For this i used 3 files in all. 

1) users.mdb 

2) datastore.asp 

3) viewBase.asp

here are their contents of asp files:

--------------------  DataStore.asp   ---------------------



<%

   Dim strPath, pass

   strPath = Server.MapPath("users.mdb")

   pass = "12345"

   strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; password= " &  pass & _

                      ";Data Source =" & strPath & ";Persist Security

Info=False"

  

%>

--------------------  viewBase.asp   ---------------------



<!-- #include file ="DataStore.asp" -->

<%



Dim adOpenForwardOnly, adCockReadOnly, adcmdTable



adOpenForwardOnly = 0

adLockReadOnly = 1

adcmdTable = 2



Dim objConn, objRS

Set objConn = Server.CreateObject("ADODB.Connection")

Set objRS = Server.CreateObject("ADODB.RecordSet") 





objConn.Open strConnect



objRS.Open "email", objConn, adOpenForwardOnly, adLockReadOnly, adcmdTable



While Not objRS.EOF 

   Response.Write "email: " & objRS("email") & "<BR>" & _

	            "name: " & objRS("name") & "<BR>" & _	

		"sname: " & objRS("sname") & "<BR>" & _

		"msg: " & objRS("msg") & "<P>"

   objRS.MoveNext 

Wend



objRS.Close

objConn.Close

SET objRS = Nothing   

SET objConn = Nothing



%>



Error Type:

Microsoft JET Database Engine (0x80040E4D)

Cannot start your application. The workgroup information file is missing

or opened exclusively by another user.

/passbase/Connect2.asp, line 34

line 34 is the one that contains       objConn.Open strConnect



Message #3 by "ASPy" <alakale@y...> on Tue, 31 Oct 2000 11:43:47 -0000
I want ot do it using "Provider=Microsoft.Jet.OLEDB.4.0" not not ODBC, how

can i?


  Return to Index