Hi.....need hel from u guys...would like to ask on the error with the coding below...the total dura_hour did not shown in the textbox...can anyone point out the mistake or the missing coding?

Me.OracleSelectCommand2.CommandText = "SELECT sum(DURA_HOUR) FROM DOWNTIME"
Me.OracleSelectCommand2.Connection = Me.OracleConnection2

OracleConnection2.Open()
OracleSelectCommand2.ExecuteNonQuery()
OracleDataAdapter2.Fill(DataSet141)
txtRelia.DataBind()
OracleConnection2.Close()

thx in advance

hi

this is basically what you have to do:

Dim ds As New DataSet
Dim da As New OracleDataAdapter
Dim cmd As New OracleCommand
Dim connection As OracleConnection = New OracleConnection

Dim strConnString As String = "Data Source=yourDataSource; User ID=xxx; Password=yyy"

connection.ConnectionString = strConnString
connection.Open()

Dim sqlCommand As String = "SELECT * FROM myTable"
cmd.CommandText = sqlCommand
da.SelectCommand = cmd
da.SelectCommand.Connection = connection

da.Fill(ds, "tableName")

and that is it; at this point you should have in the dataset a table with the information specified in the command text for the connection.

Hope it helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.