Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delphi databse manual or tutorial

Status
Not open for further replies.

QuintonV

Technical User
Jul 3, 2001
37
ZA
Im still new to delphi and want to write a databse application so far I can filter stuff using sql filtersets and display the databse results on a form but I want the user to be able to enter data to filter by does anyone knowe of a good tutorial that could showe me how to do this and is it possible to have one for that has the search parameters on it and then display the results on another form? how would I get the other form to call up the search form parameters?

Thanx

Quinton
 
QuintonV,

Well, the Filtering Datasets topic group in the Developing Database Applications Help file provided with Delphi contains some examples and pointers. Also, there are a number of demos provided as well. You may find the ones in \demos\db\filter and \demos\db\gdsdemo particularly useful.

Keep in mind that there are generally several ways to do this. First off, "filters" may not be your best approach, depending on the database format you're using. For example, ranges can provide better performance when working with Paradox tables. Of course, you need the appropriate indexes. Nevertheless, the speed improvement is worth the extra effort.

In general, however, the process requires the following steps:

1. Create an interface for collecting the conditions from the user. This can be an edit box, a separate form presented as a dialog, or anything thing else you can think of.

2. Save those values into the appropriate forms for the approach you're taking. For example, if you're constructing an SQL query from the user's input, then use standard string assembly techniques to add the user's input into the SQL string.

3. Assign the results to the appropriate objects, properites, or methods.

4. Fire it off and handle exceptions or the results as appropriate.

That's very general because there are a number of ways to do this and you're really only limited by your imagination.

Start by fiddling with the examples to get an idea of what's possible. You might consider creating a little prototype using the tables in DBDEMOS and then adapting that for your application.

Hope this helps...

-- Lance
 
Thanx allot lance this all makes sense as im a seasoned asp application developer but limitations has forced me to move onto delphi, and so far I realy like what ive seen.

Have a nice day mate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top