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 = ConfigurationSe ttings.AppSetti ngs("SystemConn ection")
sysDatabase = server.createob ject("ADODB.con nection")
sysDatabase.ope n(sysConn)
end sub[/HTML]
This me sub for my DataGrid:
[HTML]Sub BindData()
sysConn = ConfigurationSe ttings.AppSetti ngs("SystemConn ection")
objCmd = New OleDbCommand("S ELECT top 10 * FROM tbl_ACCO_EU_Con tacts", sysDatabase)
sysDatabase = server.createob ject("ADODB.con nection")
sysDatabase.ope n(sysConn)
objRdr = objCmd.ExecuteR eader()
dbcontacts.Data Source = objRdr
dbcontacts.Data Bind()
objRdr.Close()
End Sub[/HTML]
Where am I going wrong?
Cheers
adz
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 = ConfigurationSe ttings.AppSetti ngs("SystemConn ection")
sysDatabase = server.createob ject("ADODB.con nection")
sysDatabase.ope n(sysConn)
end sub[/HTML]
This me sub for my DataGrid:
[HTML]Sub BindData()
sysConn = ConfigurationSe ttings.AppSetti ngs("SystemConn ection")
objCmd = New OleDbCommand("S ELECT top 10 * FROM tbl_ACCO_EU_Con tacts", sysDatabase)
sysDatabase = server.createob ject("ADODB.con nection")
sysDatabase.ope n(sysConn)
objRdr = objCmd.ExecuteR eader()
dbcontacts.Data Source = objRdr
dbcontacts.Data Bind()
objRdr.Close()
End Sub[/HTML]
Where am I going wrong?
Cheers
adz
Comment