Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Querying Data from Secured Access Database with VBA

Does anyone know the syntax to establish a workspace/connection to query data
from an Access database that has security set up?

I've set up a special UserID and Password for this purpose.

Thanks,

VBA Dabbler
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Querying Data from Secured Access Database with VBA

Do you mean something like this:
Set adoConn = New ADODB.Connection
adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
sAccessDB & "; USER ID=Admin; PASSWORD=abcd;"

or does the database itself have a password:


http://www.able-consulting.com/MDAC/...orMicrosoftJet

Look for the section 'If MDB has a database password'

--
Regards,
Tom Ogilvy

"VBA Dabbler" wrote in message
...
Does anyone know the syntax to establish a workspace/connection to query

data
from an Access database that has security set up?

I've set up a special UserID and Password for this purpose.

Thanks,

VBA Dabbler



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Querying Data from Secured Access Database with VBA

Tom,
Yes. However, the database is on a network share and so is the workgroup
file. I browsed your site - the closest match I found to my situation is "If
using a Workgroup (System Database)" under "OLE DB Provider for Microsoft Jet
". It's below:

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:System Database=MySystem.mdw", _
"myUsername", "myPassword"

How do I point to the workgroup file? Replace the "MySystem.mdw" reference
to the path/name combination of the workgroup file?

Thanks,

VBA Dabbler

"Tom Ogilvy" wrote:

Do you mean something like this:
Set adoConn = New ADODB.Connection
adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
sAccessDB & "; USER ID=Admin; PASSWORD=abcd;"

or does the database itself have a password:


http://www.able-consulting.com/MDAC/...orMicrosoftJet

Look for the section 'If MDB has a database password'

--
Regards,
Tom Ogilvy

"VBA Dabbler" wrote in message
...
Does anyone know the syntax to establish a workspace/connection to query

data
from an Access database that has security set up?

I've set up a special UserID and Password for this purpose.

Thanks,

VBA Dabbler




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Querying Data from Secured Access Database with VBA

Perhaps someone here is an expert on this, but I know I am not. I would
recommend posting in an Access newsgroup for a more definitive answer. the
only relevance to Excel is that you are doing it through Excel VBA, but that
would be true for Word, PowerPoint, VB and so forth.

--
Regards,
Tom Ogilvy

"VBA Dabbler" wrote in message
...
Tom,
Yes. However, the database is on a network share and so is the workgroup
file. I browsed your site - the closest match I found to my situation is

"If
using a Workgroup (System Database)" under "OLE DB Provider for Microsoft

Jet
". It's below:

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:System Database=MySystem.mdw", _
"myUsername", "myPassword"

How do I point to the workgroup file? Replace the "MySystem.mdw"

reference
to the path/name combination of the workgroup file?

Thanks,

VBA Dabbler

"Tom Ogilvy" wrote:

Do you mean something like this:
Set adoConn = New ADODB.Connection
adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
sAccessDB & "; USER ID=Admin; PASSWORD=abcd;"

or does the database itself have a password:



http://www.able-consulting.com/MDAC/...orMicrosoftJet

Look for the section 'If MDB has a database password'

--
Regards,
Tom Ogilvy

"VBA Dabbler" wrote in message
...
Does anyone know the syntax to establish a workspace/connection to

query
data
from an Access database that has security set up?

I've set up a special UserID and Password for this purpose.

Thanks,

VBA Dabbler






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Querying Data from Secured Access Database with VBA

I have posted in an Access newsgroup, but no answer yet. You're right about
the Excel relevance - actually I'll be making the calls from Word.

Regards,
VBA Dabbler

"Tom Ogilvy" wrote:

Perhaps someone here is an expert on this, but I know I am not. I would
recommend posting in an Access newsgroup for a more definitive answer. the
only relevance to Excel is that you are doing it through Excel VBA, but that
would be true for Word, PowerPoint, VB and so forth.

--
Regards,
Tom Ogilvy

"VBA Dabbler" wrote in message
...
Tom,
Yes. However, the database is on a network share and so is the workgroup
file. I browsed your site - the closest match I found to my situation is

"If
using a Workgroup (System Database)" under "OLE DB Provider for Microsoft

Jet
". It's below:

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:System Database=MySystem.mdw", _
"myUsername", "myPassword"

How do I point to the workgroup file? Replace the "MySystem.mdw"

reference
to the path/name combination of the workgroup file?

Thanks,

VBA Dabbler

"Tom Ogilvy" wrote:

Do you mean something like this:
Set adoConn = New ADODB.Connection
adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
sAccessDB & "; USER ID=Admin; PASSWORD=abcd;"

or does the database itself have a password:



http://www.able-consulting.com/MDAC/...orMicrosoftJet

Look for the section 'If MDB has a database password'

--
Regards,
Tom Ogilvy

"VBA Dabbler" wrote in message
...
Does anyone know the syntax to establish a workspace/connection to

query
data
from an Access database that has security set up?

I've set up a special UserID and Password for this purpose.

Thanks,

VBA Dabbler








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Querying Data from Secured Access Database with VBA


Tom Ogilvy wrote:
the database is on a network share and so is the workgroup
file


Perhaps someone here is an expert on this


In lieu of an expert:

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=\\ServerName\FolderName\Jet4DB.mdb;
Jet OLEDB:System Database=\\ServerName\Folder2\System_Secured_4.mdw ;
User ID=myID;
Password=mypassword;

I would
recommend posting in an Access newsgroup for a more definitive answer


I wouldn't <g. MS Access is assumed to be always connected to its
database. The average MS Access 'power' user shuns ADO and even some of
the MS Access MVPs don't seem to be able to distinguish between the MS
Access UI and the underlying Jet data engine.

Jamie.

--

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Querying Data from Secured Access Database with VBA

It works like a charm - the second line of your suggestion was especially
helpful.

Regards,
VBA Dabbler

"Jamie Collins" wrote:


Tom Ogilvy wrote:
the database is on a network share and so is the workgroup
file


Perhaps someone here is an expert on this


In lieu of an expert:

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=\\ServerName\FolderName\Jet4DB.mdb;
Jet OLEDB:System Database=\\ServerName\Folder2\System_Secured_4.mdw ;
User ID=myID;
Password=mypassword;

I would
recommend posting in an Access newsgroup for a more definitive answer


I wouldn't <g. MS Access is assumed to be always connected to its
database. The average MS Access 'power' user shuns ADO and even some of
the MS Access MVPs don't seem to be able to distinguish between the MS
Access UI and the underlying Jet data engine.

Jamie.

--


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Data from a secured Access database erick-flores Excel Discussion (Misc queries) 2 November 16th 06 05:31 PM
Help: pivot chart data in secured Access database wont show fields A C Charts and Charting in Excel 0 January 25th 06 01:28 AM
Querying data from Access Steve J Excel Worksheet Functions 0 June 14th 05 10:16 AM
Querying Access Database Edgar Thoemmes Excel Worksheet Functions 1 December 15th 04 01:58 PM
sql.request for secured Access Database record retrieval Theo Fountain Excel Programming 0 July 17th 03 08:14 PM


All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"