jobs_arghya
Dec 14th, 2007, 12:57 AM
Hi all
Hope to hear you fine both mentally and physically
Here is a new problem for you:
I am creating an inventory software. The software requires to keep track of all transactions of each fiscal year. Now I am creating database named as 2007-2008.mdb for fiscal year 2007-2008, 2006-2007.mdb for fiscal year 2006-2007 etc. The database contains the fields like stockgroup,stockitem, qty etc.
Suppose the user wants to know the transactions done in the year 2006-2007group by stockgroup. So I need to connect my dataenvironment to the database 2006-2007 which I am doing thru the code :
DataEnvironment1.ConnectionString"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\" & Trim(ipAddr) & "\BCRSTUDENT\" & Trim(fold) & Trim("\") & Trim(fold) & ".mdb;Persist Security Info=False"
DataEnvironment1.Connection1.Open
DataEnvironment1.rsCommand1_Grouping.Open "SHAPE {select * from stock } AS Command1 COMPUTE Command1 BY 'stockgroup'"
DataEnvironment1.rsCommand1_Grouping.Requery
DataReport1.Show
ipaddr is the ip address of the server where the database is locatedcentrally. and fold is tracking which fiscal year i.e fold may be 2006-2007 or 2007-2008 or like that
Now when I am showing the report for the first time it is fine.
in the QueryClose event of the DataReport i am using the code :
DataEnvironment1.Connection1.Close
When I am trying to show the record second time I am getting the Run Time Error '3709' stating
"This connection cannot be used to perform the operation. It is either closed or invalid in this context"
Can u help me out regarding this problem
Please help me
Thanx in advance
Regards
Arghya
Hope to hear you fine both mentally and physically
Here is a new problem for you:
I am creating an inventory software. The software requires to keep track of all transactions of each fiscal year. Now I am creating database named as 2007-2008.mdb for fiscal year 2007-2008, 2006-2007.mdb for fiscal year 2006-2007 etc. The database contains the fields like stockgroup,stockitem, qty etc.
Suppose the user wants to know the transactions done in the year 2006-2007group by stockgroup. So I need to connect my dataenvironment to the database 2006-2007 which I am doing thru the code :
DataEnvironment1.ConnectionString"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\" & Trim(ipAddr) & "\BCRSTUDENT\" & Trim(fold) & Trim("\") & Trim(fold) & ".mdb;Persist Security Info=False"
DataEnvironment1.Connection1.Open
DataEnvironment1.rsCommand1_Grouping.Open "SHAPE {select * from stock } AS Command1 COMPUTE Command1 BY 'stockgroup'"
DataEnvironment1.rsCommand1_Grouping.Requery
DataReport1.Show
ipaddr is the ip address of the server where the database is locatedcentrally. and fold is tracking which fiscal year i.e fold may be 2006-2007 or 2007-2008 or like that
Now when I am showing the report for the first time it is fine.
in the QueryClose event of the DataReport i am using the code :
DataEnvironment1.Connection1.Close
When I am trying to show the record second time I am getting the Run Time Error '3709' stating
"This connection cannot be used to perform the operation. It is either closed or invalid in this context"
Can u help me out regarding this problem
Please help me
Thanx in advance
Regards
Arghya