help:DNSLESS Connection for Password db

Reply

Join Date: Jul 2008
Posts: 44
Reputation: K.Vanlalliana is an unknown quantity at this point 
Solved Threads: 3
K.Vanlalliana K.Vanlalliana is offline Offline
Light Poster

help:DNSLESS Connection for Password db

 
0
  #1
Oct 8th, 2008
I am new to ASP, and I used to write the connection for my Access Database using DNSLESS Connection like this:

<HTML>
<BODY>
<%
'Actionvar=Request.QueryString("actionvar")
'** Set Up a DSNLESS CONNECTION<BR>
Set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
'DSNtemp=dsntemp & "DBQ=" & server.mappath("Record.mdb")
DSNtemp=dsntemp & "DBQ=" & server.mappath("MyWeb/MyRecord/Record.mdb")
conn.Open DSNtemp
%>

</BODY>
</HTML>


My question is:

1.Here, Record.mdb is kept inside my web Folder. If the Data have a password, then how shall I write the Connection String.

2. Is it possible to Connect MySql using ASP, if so, what is the Connection String.

If any one can solved my simple problem, I shall be very glad.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 66
Reputation: Baradaran is an unknown quantity at this point 
Solved Threads: 4
Baradaran Baradaran is offline Offline
Junior Poster in Training

Re: help:DNSLESS Connection for Password db

 
0
  #2
Oct 8th, 2008
Hi, you can use Jet 4.0 to connect to Access
:
  1. Set conn = server.createobject("adodb.connection")
  2. DSNTEMP = "provider=Microsoft.Jet.OLEDB.4.0;data source=" & App.Path & "\Record.mdb; Jet OLEDB:Database Password=yourpasswordhere"

For MySQL:
  1. Set conn = server.createobject("adodb.connection")
  2. DSNTEMP = "driver={MySQL ODBC 3.51 Driver};Server=10.10.10.1;User=USERNAME;Password=PASSWORD;Database=DB_NAME"

I think this should help.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 6
Reputation: bigb33 is an unknown quantity at this point 
Solved Threads: 0
bigb33 bigb33 is offline Offline
Newbie Poster

Re: help:DNSLESS Connection for Password db

 
0
  #3
Oct 8th, 2008
if you want, you can use my script it may help you with this problem.

Cheers
here is link
http://www.daniweb.com/forums/thread147442.html
Last edited by bigb33; Oct 8th, 2008 at 8:24 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 44
Reputation: K.Vanlalliana is an unknown quantity at this point 
Solved Threads: 3
K.Vanlalliana K.Vanlalliana is offline Offline
Light Poster

Re: help:DNSLESS Connection for Password Access DB

 
0
  #4
Oct 10th, 2008
Thank to all who reply my problem, but unfortunately the connection which you suggested is not working using this (For MSAccess with Password, using DSNLess Connection):

Set conn = server.createobject("adodb.connection")
DSNTEMP = "provider=Microsoft.Jet.OLEDB.4.0;data source=" & App.Path & "\Record.mdb; Jet OLEDBatabase Password=yourpasswordhere"



The Connection for MS Access without Passwword which I am using is:


Set conn = server.createobject("adodb.connection")

DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("MyWeb/MyRecord/Record.mdb")
conn.Open DSNtemp

The above is working properly.


Can any one give me the correct Connection for Access with ASP with Password.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 186
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: help:DNSLESS Connection for Password db

 
0
  #5
Oct 14th, 2008
I think the problem is with App.Path which, AFAIK, is not supported in ASP. It works in VB.
If the path to your database is fixed, use
  1. Set conn = server.createobject("adodb.connection")
  2. DSNTEMP = "provider=Microsoft.Jet.OLEDB.4.0;data source= << Full path to your database>>\Record.mdb; Jet OLEDB:Database Password=yourpasswordhere"
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC