Please help me i tried using crystal reports but when i close the report i cannot compact and repair the database (Access 97). how do i close the database used by my crystal report when i close the report i made...
please help...
09-12-2003 at 04:51 AM
|
BRMC Level: VB Lord Registered: 28-11-2003 Posts: 210
Re: Crystal Reports
Hi mr Roelm,
I think if u pass a connection or a query string to your report by code you must close this connection , or in my case when i close crystal report i can do whatever i want to the Db.
I think is also that if you compact the databese by code u maust pass other paramether for example the name, ecc... for saving the Db and than u must close all the connection in use for the database.
Is occur a specific error , if yes can u put the exact error?
I hope is useful.
Bye
____________________________
I don't mind not going to heaven
As long as they've got cigarettes
in hell
09-12-2003 at 09:21 AM
|
roelmr Level: Guest
Re: Crystal Reports
the error read something like. "database currently in use"
how do i disconnect from my access db then?
have any code....
10-12-2003 at 08:14 AM
|
BRMC Level: VB Lord Registered: 28-11-2003 Posts: 210
Re: Crystal Reports
Hi,
but the other question is , u are connect eith the program?
If yes u must close all the connection and then compact the db
also the connection related to crystal report.
Bye
____________________________
I don't mind not going to heaven
As long as they've got cigarettes
in hell
I think u might not close u r database connection properly in program, I mean it is still open. U can disconnect it by removing related project from ur Taskmanager by pressing Alt+Ctr+Delete.
If ur using ur softwate as a client server application then u also have to remove the same from taskmanager of other terminals.
14-08-2004 at 02:10 PM
|
krahe1977 Level: Guest
Re: Crystal Reports
Closing a query:
First declare and use your query, use a record set to run the query, once you took the data that you required and showed, printed and closed the report, must close it from the events "Terminate" and "Unload" (both of them) using the following code:
if the_record_set's_name.state = 1 then
the_record_set's_name.close
end if
unload me
Remember, both "Terminate" and "Unload" events, when you abandon the form, I'm supposing that you have a form behind the report screen.