I have an ASP.Net Application that uses a SQL Server database. I am also using ODBC to make the connection (see below). Then I load controls (many of them) with queries.
Is this the correct way to do this?
Also, I need to do most of these programatically, not at design time.
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Session("ConnString") = "DRIVER={SQL Server};SERVER=myserver;Trusted_Connection=True;DATABASE=mydatabase"
Session("MyConnection") = New Odbc.OdbcConnection(Session("ConnString"))
End Sub