Hi
In a Oracle 11g database, using the CoreLab.Oracle dll version 4.75.43.0 and CoreLab.Data dll version 4.70.24.0 - I've got this table:
CREATE TABLE FLIGHTPLAN_DAYS
(
FLIGHTPLAN_DAYS_ID NUMBER(38),
FLIGHTPLAN_DAYS2FLIGHTPLAN NUMBER(38) NOT NULL,
WEEKDAY NUMBER(38) NOT NULL,
DEPART INTERVAL DAY(1) TO SECOND(0) NOT NULL,
ARRIVE INTERVAL DAY(1) TO SECOND(0) NOT NULL,
FLIGHTPLANDAYSREVISION NUMBER(38)
);
And got this function to select data from the table:
Private Sub selectData()
Dim Constr As String = Me.cstring.Text
Dim oc As New OracleConnection(Constr)
Dim cmd As New OracleCommand
Dim dr As OracleDataReader
oc.Open()
cmd.Connection = oc
cmd.CommandText = sqlstr
cmd.CommandType = CommandType.Text
dr = cmd.ExecuteReader
If dr.Read Then
Me.TextBox1.Text = dr(0)
End If
oc.Close()
End Sub
If I select a text field the function acts as it supposed to do:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
sqlstr = "SELECT FLIGHTPLAN_DAYS_ID FROM FLIGHTPLAN_DAYS"
selectData()
End Sub
But if I select a timespan field from the table then ExecuteReader never returns:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
sqlstr = "SELECT DEPART FROM FLIGHTPLAN_DAYS"
selectData()
End Sub
Of cause I can make a workaround by formatting this timespan to a varchar2, but I need the data in a timespan variable afterwards.
I can reproduce the bug on different databases.
Does anyone else have this problem ?
Best regards
/Klaus