Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic 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 ASP Free Forums Sponsor:
  #1  
Old May 16th, 2006, 08:44 PM
gdragon989 gdragon989 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 3 gdragon989 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 22 sec
Reputation Power: 0
Using an access db

Hi imtrying to access my access db wich is password protected from vb6
Set db = OpenDatabase(App.Path & "\datbwc.mdb")
this is the string i was using till i set the password now im lost as what to do.

or where to put the password info

Reply With Quote
  #2  
Old May 16th, 2006, 11:27 PM
Adversus Adversus is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Portland, OR
Posts: 106 Adversus User rank is Private First Class (20 - 50 Reputation Level)Adversus User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 1 h 57 m 5 sec
Reputation Power: 4
Send a message via MSN to Adversus Send a message via Yahoo to Adversus
This string should be what you are looking for:

Set db = OpenDatabase(App.Path & "\datbwc.mdb", False, False, "ODBC;pwd=mypassword")

You have to specify that parameter 2 and 3 are False, otherwise if you just try to leave them out it reads "ODBC..." as parameter 2 and will throw up a nasty error.

Reply With Quote
  #3  
Old May 18th, 2006, 04:36 PM
gdragon989 gdragon989 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 3 gdragon989 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 22 sec
Reputation Power: 0
error '3151'

I get an error that says the odbc connection faild

Reply With Quote
  #4  
Old May 19th, 2006, 03:28 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 1,932 sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 6 Days 22 h 36 m 35 sec
Reputation Power: 1243
Try something like this:
Code:
Set db = New ADODB.Connection
With db
    .Provider = "Microsoft.Jet.OLEDB.4.0"
    .ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;"
    .CursorLocation = adUseClient
    .Open
End With

Check out www.connectionstrings.com, it does exactly what it says on the tin!!!

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Using an access db


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



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT