Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default VBA in Excel & ADO: some problems

Hey guys,

I'm quite new in ADO and I need some help...

1) can the same MSAccess database be accessed from Excel using ADO at the
same time?? what should be the "mode" property on the connection string??

2) how can I put a password to the database and access to it from MSExcel
using ADO?? should I use the "user" and "password" property in the connection
string??

Any hint will help me out here. Thanks.

Bregards

Santiago.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default VBA in Excel & ADO: some problems


"Santiago" wrote in message
...
Hey guys,

I'm quite new in ADO and I need some help...

1) can the same MSAccess database be accessed from Excel using ADO at the
same time?? what should be the "mode" property on the connection string??


Yes you can. As it is being shared, you would not want tyo try and open it
exclusivley, so don't set it at all.

2) how can I put a password to the database and access to it from MSExcel
using ADO?? should I use the "user" and "password" property in the

connection
string??


Yes, here is an example

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default VBA in Excel & ADO: some problems

1. Yes you can connect to the same database more than once. The mode
property depends on whether you want to modify the data and whether you want
more than one person to be able to read/update the database at the same time

2. You'll need to specify the UserId and Password when you open the
connection, e.g. connection.Open strConectString, strUserId, strPassword.
You might need to specify which System Db you're using in the connection
string, i.e. the Jet OLEDB:System Database parameter.
--
HTH

Simon


"Santiago" wrote:

Hey guys,

I'm quite new in ADO and I need some help...

1) can the same MSAccess database be accessed from Excel using ADO at the
same time?? what should be the "mode" property on the connection string??

2) how can I put a password to the database and access to it from MSExcel
using ADO?? should I use the "user" and "password" property in the connection
string??

Any hint will help me out here. Thanks.

Bregards

Santiago.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default VBA in Excel & ADO: some problems

Ok Guys thanks.

So ... if I do not specify the mode property, users can access update and
read data at the same time... good

I know how to specify userid and pass in ADO, but how can I add password to
the database in Access?? I know it should not be in this forum but since it's
all related...

Thanks again. Bregards


"Simon Letten" wrote:

1. Yes you can connect to the same database more than once. The mode
property depends on whether you want to modify the data and whether you want
more than one person to be able to read/update the database at the same time

2. You'll need to specify the UserId and Password when you open the
connection, e.g. connection.Open strConectString, strUserId, strPassword.
You might need to specify which System Db you're using in the connection
string, i.e. the Jet OLEDB:System Database parameter.
--
HTH

Simon


"Santiago" wrote:

Hey guys,

I'm quite new in ADO and I need some help...

1) can the same MSAccess database be accessed from Excel using ADO at the
same time?? what should be the "mode" property on the connection string??

2) how can I put a password to the database and access to it from MSExcel
using ADO?? should I use the "user" and "password" property in the connection
string??

Any hint will help me out here. Thanks.

Bregards

Santiago.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default VBA in Excel & ADO: some problems

I gave you that in my response.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Santiago" wrote in message
...
Ok Guys thanks.

So ... if I do not specify the mode property, users can access update and
read data at the same time... good

I know how to specify userid and pass in ADO, but how can I add password

to
the database in Access?? I know it should not be in this forum but since

it's
all related...

Thanks again. Bregards


"Simon Letten" wrote:

1. Yes you can connect to the same database more than once. The mode
property depends on whether you want to modify the data and whether you

want
more than one person to be able to read/update the database at the same

time

2. You'll need to specify the UserId and Password when you open the
connection, e.g. connection.Open strConectString, strUserId,

strPassword.
You might need to specify which System Db you're using in the connection
string, i.e. the Jet OLEDB:System Database parameter.
--
HTH

Simon


"Santiago" wrote:

Hey guys,

I'm quite new in ADO and I need some help...

1) can the same MSAccess database be accessed from Excel using ADO at

the
same time?? what should be the "mode" property on the connection

string??

2) how can I put a password to the database and access to it from

MSExcel
using ADO?? should I use the "user" and "password" property in the

connection
string??

Any hint will help me out here. Thanks.

Bregards

Santiago.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default VBA in Excel & ADO: some problems

Thanks, but what I mean is the userid and pass used in the Connection string
is the one that I put in access in "TOOLSSECURITYUSER AND GROUP ACCOUNTS"??

thanks

bregards

Santiago

"Bob Phillips" wrote:

I gave you that in my response.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Santiago" wrote in message
...
Ok Guys thanks.

So ... if I do not specify the mode property, users can access update and
read data at the same time... good

I know how to specify userid and pass in ADO, but how can I add password

to
the database in Access?? I know it should not be in this forum but since

it's
all related...

Thanks again. Bregards


"Simon Letten" wrote:

1. Yes you can connect to the same database more than once. The mode
property depends on whether you want to modify the data and whether you

want
more than one person to be able to read/update the database at the same

time

2. You'll need to specify the UserId and Password when you open the
connection, e.g. connection.Open strConectString, strUserId,

strPassword.
You might need to specify which System Db you're using in the connection
string, i.e. the Jet OLEDB:System Database parameter.
--
HTH

Simon


"Santiago" wrote:

Hey guys,

I'm quite new in ADO and I need some help...

1) can the same MSAccess database be accessed from Excel using ADO at

the
same time?? what should be the "mode" property on the connection

string??

2) how can I put a password to the database and access to it from

MSExcel
using ADO?? should I use the "user" and "password" property in the

connection
string??

Any hint will help me out here. Thanks.

Bregards

Santiago.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default VBA in Excel & ADO: some problems

forget abt my questions, solved it!

thanks

"Santiago" wrote:

Thanks, but what I mean is the userid and pass used in the Connection string
is the one that I put in access in "TOOLSSECURITYUSER AND GROUP ACCOUNTS"??

thanks

bregards

Santiago

"Bob Phillips" wrote:

I gave you that in my response.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Santiago" wrote in message
...
Ok Guys thanks.

So ... if I do not specify the mode property, users can access update and
read data at the same time... good

I know how to specify userid and pass in ADO, but how can I add password

to
the database in Access?? I know it should not be in this forum but since

it's
all related...

Thanks again. Bregards


"Simon Letten" wrote:

1. Yes you can connect to the same database more than once. The mode
property depends on whether you want to modify the data and whether you

want
more than one person to be able to read/update the database at the same

time

2. You'll need to specify the UserId and Password when you open the
connection, e.g. connection.Open strConectString, strUserId,

strPassword.
You might need to specify which System Db you're using in the connection
string, i.e. the Jet OLEDB:System Database parameter.
--
HTH

Simon


"Santiago" wrote:

Hey guys,

I'm quite new in ADO and I need some help...

1) can the same MSAccess database be accessed from Excel using ADO at

the
same time?? what should be the "mode" property on the connection

string??

2) how can I put a password to the database and access to it from

MSExcel
using ADO?? should I use the "user" and "password" property in the

connection
string??

Any hint will help me out here. Thanks.

Bregards

Santiago.




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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
Excel 2003 drawing objects problems in Excel 2007... R. F. Collins III Excel Discussion (Misc queries) 1 August 6th 09 06:48 PM
problems with excel Jamie Excel Discussion (Misc queries) 1 April 25th 06 02:23 PM
Problems using Excel 2000 to open/save file saved in Excel 2003 [email protected] Excel Discussion (Misc queries) 1 June 29th 05 02:50 AM
Problems merging an excel file due to code or file problems? Cindy M -WordMVP- Excel Programming 0 September 14th 04 02:58 PM


All times are GMT +1. The time now is 01:44 PM.

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

About Us

"It's about Microsoft Excel"