Solved

Delphi and Ms-Access user's

Posted on 2003-11-19
7
224 Views
Last Modified: 2010-04-05
Hi Experts
How I  can define MS-Access user and password From Delphi
thanks
Best regards
0
Comment
Question by:fhbexpir
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 5

Accepted Solution

by:
Darth_helge earned 100 total points
ID: 9785444
If you want to use msAccess database in delphi you can use a TADOConnection. then fill in its connectionstring.

like this:
procedure TForm1.Button1Click(Sender: TObject);
var
ADOConnection1: TADOConnection;
Accesspwd: string;
begin
ADOConnection1 := TADOConnection.Create(nil);

ADOConnection1.ConnectionString  := 'Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source='
      +  'IFDB\Info Form.mdb;' + 'Persist Security Info=False;Jet OLEDB:'
      +  '\\Itts\Felles\MARTIN\Info Form.mdb;' + 'Persist Security Info=False;Jet OLEDB:'
      + 'Database Password=' + AccessPwd + ';Jet OLEDB:New Database Password=' + AccesPwd;

ADOConnection.Active := true;

end;

now you're connected to the msaccess database with a password.
0
 
LVL 5

Expert Comment

by:Darth_helge
ID: 9785585
ADOConnection1.ConnectionString  := 'Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source='
      +  thePathToTheDataBase + 'Persist Security Info=False;Jet OLEDB:'
      + 'Database Password=' + AccessPwd + ';Jet OLEDB:New Database Password=' + AccesPwd;

sorry, was a little fast there..

0
 

Author Comment

by:fhbexpir
ID: 9795017
Thanks for you

But I want define user and password for Ms-Access For many users runtime
(i use of Adoconnection and .....)
Like as SqlServer(Sp_Addlogin and sp_password and ....)

Thaanks
0
 

Author Comment

by:fhbexpir
ID: 9795021
Thanks for you

But I want define user and password for Ms-Access For many users runtime
(i use of Adoconnection and .....)
Like as SqlServer(Sp_Addlogin and sp_password and ....)

Thanks
0
 

Author Comment

by:fhbexpir
ID: 9804954
I want to use msAccess database in delphi.How I can define  users and password from delphi(dll,Activex,ocx,...)
thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question