Hello all....
I wrote a program that uses about 400 different select statements with around 20 different Recordset names.
Set up this way
Client side processing
Now you set and define the Recordset
Now do what ever you need to do with the data
That above code(with the only change being the Recordset’s name) happens 200 to 400 times in one process of a flat file(depending on the size of the file).
Here is the server side code.
Open the connectionstring
I was under the understanding that when set to Nothing an Active Connection is destroyed.
the server side code that I have twice in my program, both times it is set to nothing after it is used, and they are used at the beginning of the program and then not used again.
So my problem is that right now my program is running and it seems to be using between 36 and 45 diffent sockets for it's operation. That is way too many, I was hoping for just 3, one client side one and two server side ones.
Any thoughts on this one for me?
TheKing
![[pc3] [pc3] [pc3]](/data/assets/smilies/pc3.gif)
I wrote a program that uses about 400 different select statements with around 20 different Recordset names.
Set up this way
Client side processing
Code:
Public g_Database_Connection as String
G_Database_Connection = (here is the connection string out of the ini file.)
Now you set and define the Recordset
Code:
Set rstAdd_Info = New Recordset
With rstAdd_Info
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.ActiveConnection = g_Database_Connection
.Open “[This would be the sql statement here]”
Code:
.Close
End With
Here is the server side code.
Code:
Set cn = New Connection
cn.Open g_Database_Connection
Code:
cn.Execute "UPDATE " & Database_Owner & "Table_Name SET Field1 = Field1 || '" & Mid(Record, 255, Len_of_Record) & "' WHERE ID_Field = " & ID_I_am_on
cn.Close
Set cn = Nothing
the server side code that I have twice in my program, both times it is set to nothing after it is used, and they are used at the beginning of the program and then not used again.
So my problem is that right now my program is running and it seems to be using between 36 and 45 diffent sockets for it's operation. That is way too many, I was hoping for just 3, one client side one and two server side ones.
Any thoughts on this one for me?
TheKing
![[pc3] [pc3] [pc3]](/data/assets/smilies/pc3.gif)