Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data source that is password protected 1

Status
Not open for further replies.

rwn

Technical User
Dec 14, 2002
420
US
I have an access table that requires a login (adminstrator) and password (Newstart06), when using the following the following code - How should the password be stated?
Thanks

Dim sConnString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\table.mdb;" & _
"User ID=administrator;" & _
"Password=Newstart06
 
You can do that in VB.Net but in Access VB you would need
Code:
Const sConnString As String = _
                 "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                 "Data Source=C:\table.mdb;" & _
                 "User ID=administrator;" & _
                 "Password=Newstart06"
or
Code:
Dim sConnString As String 
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
              "Data Source=C:\table.mdb;" & _
              "User ID=administrator;" & _
              "Password=Newstart06"

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Thank you! But this is a secured database that is accessed through the mdw file. So an error message is displayed. Below is the target that is used via a shortcut on the desk top, then the user has to type in the login and password. Do I have to try to opent he mdw first?
 
Have you tried to add something like this in sConnString ?
Jet OLEDB:System Database=\path\to\file.mdw;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
NOt sure what you mean. It currently looks like this.
Dim sConnString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Visual Studio Projects\SecuredDataBase\FinishedTickets.mdb;" & _
"User ID=Administrator;" & _
"Password=Newstart06
 
Below is the target that is used via a shortcut on the desk top
sorry, but I don't see the properties of this shortcut.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sorry, here is the target from the desktop.

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "C:\Visual Studio Projects\SecuredDataBase\FinishedTickets.mdb" /WRKGRP "C:\Documents and Settings\Rick Nicholson\My Documents\Visual Studio Projects
 
Really ?
the mdw pathname seems incomplete.
anyway you may try something like this:
sConnString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Visual Studio Projects\SecuredDataBase\FinishedTickets.mdb;" & _
"Jet OLEDB:System Database=full pathname of mdw file;" & _
"User ID=Administrator;" & _
"Password=Newstart06;"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
thanks that did the trick!!!!
 
When I moved the program to a new computer and thus set the paths, I'm unable to open the database again (oOleDbConnection.Open()). I must be missing the obvious.
The program is this:

Dim sConnString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=H:\Access Data\ricktest\FGTicket.mdb;" & _
"Jet OLEDB:System Database=H:\Access Data\ricktest\Secured.mdw;" & _
"User ID=administrator;" & _
"Password=Newstart06;"

oOleDbConnection = New OleDb.OleDbConnection(sConnstring)
oOleDbConnection.Open()

 
Does this new computer have an [!]H:[/!] drive?

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Yes, that is correct. The H drive is actually where the secured Access database resides. Prior too, all my testing was done on my workstation, I'm migating the version to the actual H drive now to do the final testing.
 
And the person logging in to this computer... Do they have permission to access the folder on the H: drive.

As a simple test, open notepad and attempt to save a simple text file in to that folder.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
yes, that person is me and I have full administrator rights. I was able to save a notepad text file into folder H:\Access Data\ricktest.
 

What gmmastros says is that you should prefer

"\\LaLaServer\KoukouPath\Mydb.mdb"

even for linking tables between 2 .mdb
 
The only thing that is different is my workstation has version 2003 access and the live system for testing has version 2002. The secured file (mdw) name for 2003 is called security and called secured for 2002.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top