J
jabailo
I created a web method to insert data on a DB2 database.
It runs well, except every time I call it, it opens and closes the ADO
connection.
I think it would run faster, since I send it hundreds of records, if I
could just keep a connection open at the point the web service starts up
and close it when the web service is shut down ( so I would open it in
the Application_Start and close it in the Application_End ).
Could that be done? Or should I make the ADO Connection object a
static global in the web service?
Could I make all the web service inserts run on that Connection?
Would it be thread-safe if I called the web method asynchronously?
It runs well, except every time I call it, it opens and closes the ADO
connection.
I think it would run faster, since I send it hundreds of records, if I
could just keep a connection open at the point the web service starts up
and close it when the web service is shut down ( so I would open it in
the Application_Start and close it in the Application_End ).
Could that be done? Or should I make the ADO Connection object a
static global in the web service?
Could I make all the web service inserts run on that Connection?
Would it be thread-safe if I called the web method asynchronously?