ADO+MSAccess+Password

Hello,

I am using RAD Studio 2007 (VCL.NET application) to connect to a MSAccess 
2002 database
with ADO-components (dbGo) like this:

ADOConnection1.ConnectionString:='FILE NAME=MyDB.udl';
ADOConnection1.Connected:=true;

using an .udl file.

Now my question:
What do I have to do, when I want to protect my DB with a password?

Thanks and regrads
Reinhard
0
Reinhard
12/17/2008 5:54:14 AM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

2 Replies
748 Views

Similar Articles

[PageSpeed] 30

There is a trick in the connection string to open the password protected Access DB file.  Here is an example of a connection string that was built at design time that does not work:

Provider=Microsoft.Jet.OLEDB.4.0;Password=sTest;User ID=admin;Data Source=C:\Documents and Settings\charmon\Desktop\Temp\Access\SegMergeDB2.mdb;Persist Security Info=True

Here is a modified connection string that works:

Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=sTest;Data Source=C:\Documents and Settings\charmon\Desktop\Temp\Access\SegMergeDB2.mdb;Persist Security Info=True

Use Jet OLEDB:Database Password= instead of Password=
0
Carl
12/17/2008 1:55:31 PM
Thank you so much!!

regards

<Carl Harmon> schrieb im Newsbeitrag news:56308@forums.codegear.com...
> There is a trick in the connection string to open the password protected 
> Access DB file.  Here is an example of a connection string that was built 
> at design time that does not work:
>
> Provider=Microsoft.Jet.OLEDB.4.0;Password=sTest;User ID=admin;Data 
> Source=C:\Documents and 
> Settings\charmon\Desktop\Temp\Access\SegMergeDB2.mdb;Persist Security 
> Info=True
>
> Here is a modified connection string that works:
>
> Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=sTest;Data 
> Source=C:\Documents and 
> Settings\charmon\Desktop\Temp\Access\SegMergeDB2.mdb;Persist Security 
> Info=True
>
> Use Jet OLEDB:Database Password= instead of Password=
0
Reinhard
12/17/2008 3:03:23 PM
Reply:

Similar Artilces:

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

ADO to ADO.NET
I'm an ASP programmer (VBScript) moving on to ASP.NET. So far I'm using:Microsoft Visual Studio 2003ASP.NET with C#I'm working on converting my code over to C#, from VBScript. Now, here is my code in VBScript (modified to better understand it, this is a edited ugly version):Function ExecuteSQL(sqlStatement)    ConnDriver = "Provider=SQLOLEDB; Data Source = " & dbIP & "; Initial Catalog = " & dbName & "; User Id = " & dbUser & "; Password=" & dbPassword     Set connTemp = Server.CreateObject("ADODB.Connection")    c...

ADO not ADO.NET
Hi, I have to connect to a db using adodb (which i select from the references). I have to retrieve the car models from the database and bind them to a listbox. I am not sure how to proceed and I can't find any articles on ADO with .net and data binding. Here is the code that i tried but it only retrieves the car model for the specified id. If I delete the id it doesn't work. Also it writes the car model in the listbox vertically such as: B M W CODE: Imports System.Data Imports ADODB Imports System.Data.OleDb Public Class listboxADO Inherits System.Web.UI...

ADO+MSAccess+password #2
Hello, I am using D2007 and connect my application with an MS-Access-DB via ADOConnection and udl-file (ADOConnection1.ConnectionString='xxx.udl'). My database has no password protection. What do I have to do (in the udl-file and in the delphi application) if I want the DB to be password protected? Thanks in advance! Reinhard If I have understood you correctly, I recommend that you build a ConnectionString in the Delphi IDE using the wizard, and the user id and password you supply there will appear in the ConnectionString property and you can bring it into your udl. ...

ASA7 ADO & Delphi ADO ?? Anyone is using it?
Any comments? Is it working? Any Problems? Thanks Hi, PR <noemail@no.com> schrieb in im Newsbeitrag: BoTThJaq$GA.89@forums.sybase.com... > Any comments? Is it working? Any Problems? I tried to connect to ASA7 via the new OLE DB - Provider and ADOExpress from Delphi 5.01. No chance. Only the error message 'Invalid Enum Value'. About the new provider I haven't heard anything good until now... Regards Frank Frank, I've experienced the same problem with the ASA 7 OLEDB Provider. I'm not sure if this is a bug in the AsaProvider or Delp...

ADO.NET VS ADO
Hi I am having ADO.NET course these days. I asked the instructor that developing online system like airline reservation system needs to a connected environment to lock/Unlock the table when u read/write to it Can that be acomplished using ado.net. His answer was no ADO.NET is only for disconnected environment and it will not work with online system and i still should use the old ADO. ADO.NET is not a replacment for ADO and both will continue in paralell. IS his answer true that ADO.NET will not replace ADO and both will continue Regards Check this link. Well ADO.NET is pa...

Opinions about ADO and ADO.NET
Hi everyone again!!! I´m used to develope applications with ADO, but now with .NET to develope a Web Application and a Mobile Web Application, I don't know if I have to use ADO.NET or continue using ADO. What Disadvantages has ADO to built Mobile Applications? In ADO I use ACCESS to create the .mdb files, Can I use .mdb files with ADO.NET? Thanks for all!! Go to ADO.NET NOW ! don't be late and you can use access in ado.net ADO.NET VB.NET/C#/ASP.NET/Oracle Designer 6i DotNet4Arab.com Building a custom web control(vb.net) Well, Thanks for your opinion, but I have...

ADO to ADO.NET help
Hi, I am converting application ASP to ASP.NET.What is the equivalent code in ADO.NET. For each F in RS.Fields FieldName = F.Name Next Thanks, Nate If it is forward only, then you can use datareader for more info on this, check below link Datareader on MSDN Hope it helps!Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti...

Converting ADO to ADO.NET
Hi, I am trying to convert this code from ADO to ADO.NET I am very new to ADO.NET and am a bit confused on how I would convert this. Basically what I am trying to do is capture the name of the fields of a table to populate a dropdownlistbox. The table name will change every time the program is run. This is not a problem and I can code for that. Here is what I have in ADO (I have tried the wizard but it did not change the code) Dim tblFields As Object Dim myRst As New ADODB.Recordset Dim myField As ADODB.Field Dim myCnn As New ADODB.C...

ADO
I use Sql server.Is ADO most appriate for operating with this?Please tell me some good knowledge resourse . If not please tell me what is more appropriate and also please tell me some good knowledge resourse. Pero perov wrote: > I use Sql server.Is ADO most appriate for operating with this?Please > tell me some good knowledge resourse . If not please tell me what > is more appropriate and also please tell me some good knowledge > resourse. Yes ADO (dbGo) is the most appropriate. -- Regards, -Steve Faleiro- What about anydac or sdac? Thx "Steve Falei...

ADO
Hi Could some tell me where I should be looking for information on how to use the ADO Connection and RecordSet objects from Perl and the DBI? Thanks David Billingham Senior Software Developer - Poise Associates Email: db@poise.co.uk PS Why do so many people have problems unsubscribing? I run a Majordomo list and it's a comman thing for people on the list to get in a real tangle about unsubscribing.... :) This e-mail is subject to copyright and the information in it is confidential. Use of this e-mail or of any information in it other than by the addressee is un...

ADO
Hi NG, i try to connect to a sybase-db via adodc (visual basic). i can only select from the db. Updates will produce a e_fail. now i read in the white paper of msdasql, that msdasql requires an odbc-driver to be odbc-version 3.x conformance level 1. the sybase ase odbc driver (v. 3.50.00.10) are only core. is there a way to connect sybase using ado? please help me marcel Sybase 12.0 (PC-client) - VB6 - SP5 - MDAC2.6 firstly,you can install the mdac 2.6,and then install the oledb provider for sybase, the second step: you can use the createobject("adodb.conne...

ADO
I have some problem to connect with transaction component to a ODBC LotusNoteSQL driver. I want to try with ADO component. I search some sample. Can you help me? Thank Thierry More info.... When I try to connect with transaction, and Select with Query, I have no problem with test button (I can see all my records) but in a form with any object (grid, listview ...) I see nothing !!! SOS, Heeeeelppppp meeeeeee Thierry ...

ADO
Does anyone have any examples of using Microsoft's ADO and powerbuilder. I am looking into ways of getting metadata of any connections I make in my Powerbuilder Application. Currently I am using the ODBC API's to achieve this. I have looked and tested some ADO calls in VB and find that it is much faster than ODBC in getting metadata. Thanks In Advance Derrick ...

Web resources about - ADO+MSAccess+Password - embarcadero.delphi.ado

Resources last updated: 12/2/2015 12:40:26 PM