I have the vb.net program and the MS SQL Server on the same machine (its a POS program)
If the POS sits for a little while, 10, 20 minutes.. the first sale to go through takes a good 20 seconds to save the info into the database.. any orders done right after are fast
when the "finish button" is clicked, it inserts or updates the customer info, then inserts the order info, then the order details.
3 different tables.
It then opens an rdlc to print....
using
the Settings is this (the Min Pool Size was just added.. Not sure if it will help?)Code:Public conn As New SqlConnection(My.Settings.POSDataConnectionString)
I always open the connection (which if it already open) it doesnt open anotherCode:Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\POSData\POSData.mdf;Integrated Security=True;Min Pool Size=1;
and then close it after..Code:If conn.State <> ConnectionState.Open Then conn.Open() End If
is there something I can do? can I keep it open? just call the open each time to make sure its open.. and only close it when the app closes? Im also wondering if the rdlc (report viewer report) could be the delay.




Reply With Quote