Dave C
November 25th, 2007, 11:18 AM
VB dot NET with an Oracle 9i table, one column comes up as being null and it's not.
My SELECT statement includes 38 fields and all column names are spelled correctly.
=================
strSql = "SELECT CUST_NAME, MFG_SITE, PO_NO, SO_NO, LINE_NO, DUE_DATE, WO_NO, LINE_QTY, PART_NO, " etc,
Item 7 LINE_QTY is the one breaking my stones...
After filling the Dataset:
' test column 7 for null and assign it to a variable if not...
Dim str_qty As String
If Not DS.Tables(0).Rows(0).IsNull(7) Then
str_qty = DS.Tables(0).Rows(0).Item(7).ToString
Else
str_qty = "0"
End If
All the other columns return correct data. This one is a numeric field that is definitely not null. I'm using OracleClient connection and data adapters.
If I preview the data with the DataAdapter the field shows correct data. The data type for this field is System.Decimal (the table design says it's a NUMBER)
If I use a different field name for position 7 in the select statement the field does not return NULL.
Someone give me a clue here please.
My SELECT statement includes 38 fields and all column names are spelled correctly.
=================
strSql = "SELECT CUST_NAME, MFG_SITE, PO_NO, SO_NO, LINE_NO, DUE_DATE, WO_NO, LINE_QTY, PART_NO, " etc,
Item 7 LINE_QTY is the one breaking my stones...
After filling the Dataset:
' test column 7 for null and assign it to a variable if not...
Dim str_qty As String
If Not DS.Tables(0).Rows(0).IsNull(7) Then
str_qty = DS.Tables(0).Rows(0).Item(7).ToString
Else
str_qty = "0"
End If
All the other columns return correct data. This one is a numeric field that is definitely not null. I'm using OracleClient connection and data adapters.
If I preview the data with the DataAdapter the field shows correct data. The data type for this field is System.Decimal (the table design says it's a NUMBER)
If I use a different field name for position 7 in the select statement the field does not return NULL.
Someone give me a clue here please.