Hi all,
I'm have issues with my DB connection and the use of DataGrids.
My DB connection is through my web.config file and the sub looks as follows:
[HTML]sub OpenDatabase()
sysConn = ConfigurationSettings.AppSettings("SystemConnectio n")
sysDatabase = server.createobject("ADODB.connection")
sysDatabase.open(sysConn)
end sub[/HTML]
This me sub for my DataGrid:
[HTML]Sub BindData()
sysConn = ConfigurationSettings.AppSettings("SystemConnectio n")
objCmd = New OleDbCommand("SELECT top 10 * FROM tbl_ACCO_EU_Contacts", sysDatabase)
sysDatabase = server.createobject("ADODB.connection")
sysDatabase.open(sysConn)
objRdr = objCmd.ExecuteReader()
dbcontacts.DataSource = objRdr
dbcontacts.DataBind()
objRdr.Close()
End Sub[/HTML]
Where am I going wrong?
Cheers
adz