Microsoft
Software
Hardware
Network
Question : multiple connections per user
When displaying data on a web-page I open a new database connection each time I use it.
But this can result in many connections per page. Is there a way to open a connection at the beginning of the page and close it again when the page is finished?
or should I make 1 connection per session?
now I use:
Imports System.Data
Imports MySql.Data.MySqlClient
Dim connString As String = "server=localhost; user id=xxx; password=xxx; database=xxx; pooling=false;"
Dim con = New MySqlConnection(connString
)
con.Open()
Dim query As String = "query string here"
Dim ds = New DataSet()
Dim da = New MySqlDataAdapter(query, con)
da.Fill(ds)
//code here//
ds.Dispose()
da.Dispose()
con.Close()
con.Dispose()
Answer : multiple connections per user
There is a option called connection pooling, check this link
http://stackoverflow.c
om/questio
ns/1450984
/storing-d
atabase-
co
nnections-
in-session
-in-a-smal
l-scale-we
bapp
Random Solutions
changing formview background color
SQL 2005 - An expression of non-boolean type specified in a context where a condition is expected, near 'THEN'.
hide FormView "delete" and "edit" button links programmatically
Create File from count
Backup exec 12.5 issues
Example of having a input in excel, access calculates and provides answer
Exch 07 users cannot email Exch 03 users
webservice: problem with enumerated element in xsd class vb.net vs2005
VBA for Updating Table Data
How to re-link SCOM 2007 to its SCOM Database