ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 26th, 2003, 04:34 AM
faithiology faithiology is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: egypt
Posts: 16 faithiology User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
password in conn string (*.mdb)

i use this

conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=D:\Work\ash\batesdb.mdb"


but don't know how 2 provide
"uid=login;pwd=my password"

thank u all

Reply With Quote
  #2  
Old February 26th, 2003, 04:29 PM
dotMATRIX dotMATRIX is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Cincinnati, Ohio
Posts: 25 dotMATRIX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to dotMATRIX
If this is an Access database why the username and password? Something like this should work fine:

Code:
<%
Set DataConnection = Server.CreateObject("ADODB.Connection")
DataConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & "YOUR DATABASE PATH AND NAME & ";"

Set cmdDC = Server.CreateObject("ADODB.Command")
cmdDC.ActiveConnection = DataConnection

   SQL = "SELECT * FROM tbl.Whatever"

cmdDC.CommandText = SQL

cmdDC.CommandType = 1

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

   '-- Opening record set

'-- Cursor Type, Lock Type

'-- ForwardOnly 0   ReadOnly 1
'-- KeySet 1   Pessimistic 2
'-- Dynamic 2   Optimistic 3
'-- Static 3   BatchOptimistic 4

RecordSet.Open cmdDC, , 3, 2
%> 


dot

Reply With Quote
  #3  
Old February 26th, 2003, 10:44 PM
ngibsonau ngibsonau is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 138 ngibsonau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
To answer faithology, Because some people put passwords on Access databases so they have a little bit of security on them.

If you don't set a Provider in the connection string I think it defaults to "MSDASQL.1"

Here is a connection string that opens Access databases and allows passwords.

Code:
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\Work\ash\batesdb.mdb; Jet OLEDB:Database Password=dbpass;"


i had to edit so you could see the the face

Jet OLEDB:<- then 'Database'
__________________
--

ngibsonau

Last edited by ngibsonau : February 26th, 2003 at 11:02 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > password in conn string (*.mdb)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway