Hi,
Regarding your task I would use Microsofts ADO framework in conjunction with a ODBC driver. For that first you have to place a TADOConnection component on the form or datamodule. In the 'connectionstring' property of the component you'll have to state something like:
Quote:
|
Provider=MSDASQL.1;Persist Security Info=False;Data Source=DBName
|
You can also build a connectionstring with a wizard after clicking the elipsis button at the right side of the entryfield for connectionstring in the Object Inspector.
Next to that you'll have to place a TADOQuery component which refers to the TADOConnection in the 'connection' property. In the 'SQL' property of the TADOQuery you can write your query. In this you can also define two parameters for both dates that can be set dynamicly in your code.
Next place a TDataSource component that refers to the TADOQuery with it's 'DataSet' property and finally place a TDBGrid component on the form that has the name of the TDataSource component in it's 'DataSource' property.
Basically that's it, if all's configured well and the TADOQuery's 'Active' property is true everything happens automaticaly. You can also use another way of datastorage and retrieval (like BDE e.g.) but using ADO gives the lightest application because it depends on Windos own API objects. And you can read more about it in the online help under the section 'Developing Database Applications', chapters 'Connecting to databases', 'Unserstanding datasets' and 'Working with ADO components'.
Regards