|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Providing password in asp for access DB
I set passwords in access so they can't be opened seperately, how do I specify the password within the asp code when it accesses the DB? Within the code below:
<% Dim connect connect = "catalogo_" & base & "" %> <% Set DataConn = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.RecordSet") DataConn.Open connect Set rsDsp = DataConn.Execute("SELECT * FROM modelos WHERE pagina = '" &pagina& "' ORDER BY referencia,modelo,aplicacion,cartucho,ar,sustuido") If rsDsp.EOF Then Response.Write "Sorry, no entries in the database!" Else %> |
|
#2
|
|||
|
|||
|
i usually do my connection strings like this...
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(".") & "\data\rob.mdb; User Id=; Password=;" and then connect the same way you did...this way you don't need a dsn either (which i think is the way you were doing it???) hope this helps...rob
__________________
Delenda est Carthago |
|
#3
|
|||
|
|||
|
Thanks but I do need to use dsn. can anyone figure out why the code below gives me an 'Expected end of statement' error?
Set DataConn = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.RecordSet") DataConn.Open = "catalogo_holset","admin","turbott" |
|
#4
|
|||
|
|||
|
connection string?
i think you want it to look a lil more like this...
conn.open "dsn=catalogo_holset; uid=admin; pwd=turbott" ...rob |
|
#5
|
|||
|
|||
|
instead of uid and pwd you might have to say "user id=whatever" and "password=whatever"...it all depends
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Providing password in asp for access DB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|