Solved

Disable ODBC logon prompt

Posted on 1998-10-19
3
531 Views
Last Modified: 2010-04-06
Hi there,

I would like to disable (not display) the logon prompt when connecting to a MSaccess DB with ODBC.

How do I do this?

Thanks

Later
Jay
0
Comment
Question by:hulsej
3 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 40 total points
ID: 1343339
hi hulsej again,

use the TDatabase Component,
give on the Property DataBaseName a name
give on the Property AliasName the Name of the Alias you want to use

on the TTable(s) and/or TQuery(s) Components you use the Property DataBaseName should have the same entry as TDataBase.DataBaseName.

Now you can use Following code :

procedure TForm1.Database1Login(Database: TDatabase;
  LoginParams: TStrings);
{The Event OnLogin from TDataBase}
begin
  LoginParams.Values['USER NAME'] := 'YourUserName';
  LoginParams.Values['PASSWORD'] := 'YourPassWord';
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  {Connect Now}
  database1.connected := true;
  table1.open;
end;

good luck on the try

Meikl
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1343340
hey, ... what's this? I entered an answer and now it's gone...? Anyway it was the same as kretzschmar... so I couldn't give you more advise then he does. Regards, Zif.
0
 

Author Comment

by:hulsej
ID: 1343341
Thanks again, it worked fine.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

733 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