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


thx in advance


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

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 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.