Server: IBM Informix Dynamic Server Version 11.70.FC1GE
Client: IBM Data Server Driver package 5765-F41
Dotnet Client DLL:
IBM.Data.Informix.dll
File version: 9.7.4.2
Assembly Version: 9.0.0.2
Product Version: 9.7.4.2
Table info:
Column name Type Nulls timeid interval day to minute yes cb1 smallint yes cb2 smallint yes data1 smallfloat yes data2 smallfloat yes ... data60 smallfloat yes data61 smallfloat yes
.Net Code:
dim _conn as New IfxConnection("Database=HMS;Server=10.1.1.9:17859;UID=informix;Password=informix;")
_conn.Open()
Dim _cmdstr As String = "select * from data"
Dim _cmd As New IfxCommand(_cmdstr, _connection)
Dim _dr As IfxDataReader = _cmd.ExecuteReader(System.Data.CommandBehavior.SingleResult)
While _dr.Read
Debug.WriteLine(_dr.GetValue(0))
next
The type of _dr.GetValue(0) is a string.
As you can see under here a lot of the interval data is not fetched correctly! (Only the first 3 chars)
This would cause a big loss of data.
Is there anybody who knows how I can solve this??
Thx in advance.
Output from debug writeline: (... = good data I left out) 1 00:00 ... 2 00:45 2 01:00 2 0 2 01:30 2 01:45 ... 2 23:30 2 23:45 3 0 3 00:15 3 00:30 ... 3 02:00 3 02:15 3 0 3 02:45 3 03:00 ... 4 03:30 4 03:45 4 0 4 04:15 4 04:30 ... 5 02:15 5 02:30 5 0 5 03:00 5 03:15 ... 5 04:45 5 05:00 5 0 5 05:30 5 05:45 ... 6 06:00 6 06:15 6 0 6 0 6 07:00 6 07:15 ... 7 05:00 7 05:15 7 0 7 05:45 7 06:00 ... 7 07:30 7 07:45 7 0 7 08:15 7 08:30 ... 8 08:45 8 09:00 8 0 8 0 8 09:45 8 10:00 ... 9 07:45 9 08:00 9 0 9 08:30 9 08:45 ... 9 10:15 9 10:30 9 1 9 11:00 9 11:15 ... 10 11:30 10 11:45 10 1 10 12:15 10 12:30 ... 11 10:15 11 10:30 11 1 11 11:00 11 11:15 ... 11 12:45 11 13:00 11 1 11 13:30 11 13:45 ... 12 14:00 12 14:15 12 1 12 1 12 15:00 12 15:15 ... 13 12:45 13 13:00 13 1 13 1 13 13:45 13 14:00 ... 13 15:30 13 15:45 13 1 13 16:15 13 16:30 ... 14 16:45 14 17:00 14 1 14 17:30 14 17:45 ... 15 15:30 15 15:45 15 1 15 16:15 15 16:30 ... 15 18:00 15 18:15 15 1 15 18:45 15 19:00 ... 16 19:15 16 19:30 16 1 16 20:00 16 20:15 ... 17 18:00 17 18:15 17 1 17 18:45 17 19:00 ... 17 20:30 17 20:45 17 2 17 21:15 17 21:30 ... 18 21:45 18 22:00 18 2 18 22:30 18 22:45 ... 19 20:30 19 20:45 19 2 19 21:15 19 21:30 ... 19 23:00 19 23:15 19 2 19 2 20 00:00 20 00:15 ... 21 00:15 21 00:30 21 0 21 0 21 01:15 21 01:30 ... 21 23:15 21 23:30 21 2 22 00:00 22 00:15 .. 22 01:45 22 02:00 22 0 22 02:30 22 02:45 ... 23 03:00 23 03:15 23 0 23 03:45 23 04:00 ... 24 01:45 24 02:00 24 0 24 02:30 24 02:45 ... 24 04:15 24 04:30 24 0 24 05:00 24 05:15 ... 25 05:30 25 05:45 25 0 25 06:15 25 06:30 ... 26 06:45 26 07:00 26 0 26 07:30 26 07:45 ... 27 08:00 27 08:15 27 0 27 08:45 27 09:00 ... 29 10:30 29 10:45 29 1 29 1 29 11:30 29 11:45 ... 30 12:00 30 12:15 30 1 30 12:45 30 13:00 ... 30 23:45
Through ODBC it worked correctly.
With another program that uses JDBC it worked correctly.
With an old C-program that uses embedded-sql it worked correctly.
While running a bit out of time I had a dirty fix by doing a cast to nvarchar(9)
so the SQL statement became: