Y
yop
All
I need to store a connection in the application object
due to the need to use MYSQL and its very poor connection
pooling.
Would someone have an example as the code below is not
working correctly.
Thanks
Sub Application_Start(ByVal sender As Object, ByVal e As
EventArgs)
' Fires when the application is started
Dim myConn As MySqlConnection = New
MySqlConnection(ConfigurationSettings.AppSettings
("ConnectionString"))
Application("myConnection") = myConn
End Sub
Dim myConn As new MySqlConnection = CType(Application
("myConnection", MySqlConnection))
Dim query As String = "SELECT * FROM users WHERE
username='" & strUserName & "' AND usrPassword=PASSWORD
('" & strPassword & "')"
Dim myCommand As New MySqlCommand(query, myConn)
myConn.Open()
I need to store a connection in the application object
due to the need to use MYSQL and its very poor connection
pooling.
Would someone have an example as the code below is not
working correctly.
Thanks
Sub Application_Start(ByVal sender As Object, ByVal e As
EventArgs)
' Fires when the application is started
Dim myConn As MySqlConnection = New
MySqlConnection(ConfigurationSettings.AppSettings
("ConnectionString"))
Application("myConnection") = myConn
End Sub
Dim myConn As new MySqlConnection = CType(Application
("myConnection", MySqlConnection))
Dim query As String = "SELECT * FROM users WHERE
username='" & strUserName & "' AND usrPassword=PASSWORD
('" & strPassword & "')"
Dim myCommand As New MySqlCommand(query, myConn)
myConn.Open()