Definately correct, WiTango opens a single connection to the datasource. However, in the case of some databases (MS SQL, Pervasive SQL) the database engine will open more than one connection to the data file(s).
In my experience, when WiTango opens that database connection, the database conection only stays open to the database engine for the duration of the transaction. Although the datasourcelife timeout is set to 30 mins, this doesn't use any bandwidth or WiTango server resources unless the database is currently in a transaction. When inserting multiple records using a For Loop, this weighs heavily on the WiTango server and will slow down other users requesting tafs from the WiTango server. If you can, create a stored procedure on the database end, and call the procedure in your application. This way, your database engine handles the load and not the WiTango server. Rick Sanders > Hi, > > >I may be wrong but to the best of my knowledge WiTango opens a connection to > >the DB once and keeps it open for the duration of the action. So the loop > >does not create a new connection for every insert. > > You are incorrect. By default (Wi)tango opens a single connection to a > specific data source (that is, database) when the first action requires it. > It then keeps that connection open for subsequent actions in that or any > other taf to use. If no activity happens on a connection after a specified > period of time, the connection is dropped. The amount of time before > dropping a connection is set via the dataSourceLife configuration variable. > The default value for this variable is 30 (minutes). > > If you are running one taf using that connection and another taf is called > which also requires a connection to that database, (Wi)tango will open a > second connection and allow the taf to use it. Of course, this feature > depends on your database allowing multiple connections, but SQL databases > generally do. (Wi)tango will keep opening new connections in this fashion > up to a point (which I can't remember off the top of my head). > > Hope this helps. > > Eric > > ________________________________________________________________________ > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] > with unsubscribe witango-talk in the message body > ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body