Re: Delph7 + ADO conenction to advantage & oracle
From: Brian Bushay TeamB (BBushay_at_Nmpls.com)
Date: 03/30/04
- Previous message: Brian Bushay TeamB: "Re: checking for error following an UPDATE"
- In reply to: mike calcagno: "Delph7 + ADO conenction to advantage & oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Mar 2004 21:22:44 -0600
>I'm new to delphi and have been given the task of writing a program to
>connect to a database and then login to the program based on matching the
>supplied username & password with a username and password stored in a table
>in the database.
>
>I've done this connecting to paradox, but im not sure how to go about
>connecting using ADO. Are there any sample sites or tutorials? I don't like
>asking for code, but if there was a sample somewhere it would help.
This should not be much different from what you used with Paradox.
You connect to and OleDb connection using a connection string. Part of that
string specifies the database you connect to. If you need to configure the
database at runtime you change the connection String at runtime.
You can either do this with string parsing or use the TadoConnection.Parameters
property to change individual parameters of the connection string.
Once your connection string is configured Open the TadoConnection. You can pass
username and password as parameters of the Open method. If you are finding a
username and password in a table you may want to hard code the Username and
password that the database needs.
Assuming you have provided a valid username and Password to open the database
your next step is to find the username and password the user provides on login
in the table where you store these values. Then take the appropriate action
I use my own form for the user to enter their username and password on.
I make the database connection after the user has enter a username and password
and pressed the Ok button on the form.
-- Brian Bushay (TeamB) Bbushay@NMPLS.com
- Previous message: Brian Bushay TeamB: "Re: checking for error following an UPDATE"
- In reply to: mike calcagno: "Delph7 + ADO conenction to advantage & oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]