Click to See Complete Forum and Search --> : Data Report


July 24th, 2000, 03:11 PM
Hi,
How can I open a database file and recordset in run time in data report? Because I try to open the database file in the data environment, I believe it only open a directory, it does not allow me to say app.path & "/mydb.mdb".
And also, I would like to do a counter report which it counts for how many times between two days that a customer order certain items for each category.
If possible, please give me some code to demostrate.
Thank You.

Johnny101
July 24th, 2000, 04:05 PM
when your app starts you can set the DataEnvironment1.Connection1.ConnectionString = "your connection string". you may have to check the status of this connection as sometimes it will be open. if you dont want to do it this way, yuo can also use the WillConnect event of the DataEnvironment - actually this is a better way of doing it. Double click your connection and then choose WillConnect from the event list box - reset the connecionstring there pointing to your app.path & "\mydb.mdb".

hope this helps,

John

John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org