Hi.
Regarding to the performance factor, which type of connection should we adopt if using SQL server:
1. Set a connection once at run time, exit it when eixt the whole application
2. Set a connection on a specified time, exit it when exit a certain function/procedure. Thus, it has to set another new connection for the next function/procedure.
Besides, is there any trade-off if i applied the second method? I have to use the second method since i have encountered:
Run-time error: 3709
The connection cannot be used to perform this operation. It is either closed/invalid in this context.
This error happened when i used the first method and until i do again the 'select' statement, it cause me this error.
Does anybody have the idea?
Regarding to the performance factor, which type of connection should we adopt if using SQL server:
1. Set a connection once at run time, exit it when eixt the whole application
2. Set a connection on a specified time, exit it when exit a certain function/procedure. Thus, it has to set another new connection for the next function/procedure.
Besides, is there any trade-off if i applied the second method? I have to use the second method since i have encountered:
Run-time error: 3709
The connection cannot be used to perform this operation. It is either closed/invalid in this context.
This error happened when i used the first method and until i do again the 'select' statement, it cause me this error.
Does anybody have the idea?