Connecting to Oracle8i
Hi,
having a problem getting my program to display any data from my oracle db. Its a web based app, with the page having only a gridview on it. However when the page opens it displays nothing. The data does exist in the db but for some reason isnt being displayed. I am a complete newbie by the way so please be nice......
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim dbConn As New OracleConnection
dbConn.ConnectionString = "Data Source=bnp;Persist Security Info=True;User ID=bnp;Password=bnp"
dbConn.Open()
Dim dbDataAdapter As New OracleDataAdapter()
dbDataAdapter.SelectCommand = New OracleCommand()
dbDataAdapter.SelectCommand.Connection = dbConn
dbDataAdapter.SelectCommand.CommandText = "Select cu_name from cu_offices where cu_name =WCS"
dbDataAdapter.SelectCommand.CommandType = CommandType.Text
Dim dbDataSet As New DataSet
dbDataAdapter.Fill(dbDataSet, "names")
GridView1.AutoGenerateColumns = True
GridView1.DataSource = dbDataSet
GridView1.DataMember = "names"
End Sub
any help at all would be really appreciated, as this is driving me mad.
Regards,
David.
|