Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
Excel 2003 drawing objects problems in Excel 2007... | Excel Discussion (Misc queries) | |||
problems with excel | Excel Discussion (Misc queries) | |||
Problems using Excel 2000 to open/save file saved in Excel 2003 | Excel Discussion (Misc queries) | |||
Problems merging an excel file due to code or file problems? | Excel Programming |