A
André
Hi,
I don't now whether this is a problem with excel, with oledb provider or
asp.net, so i send it to those groups.
I created a table in excel with, to simplify, two fields and 30 records.
Now i fetch the values from that table with classic commands like:
Dim oConnection As OleDbConnection
Dim sConnection As String
oConnection = New OleDbConnection()
Dim comd As OleDbCommand
Dim dtreader As OleDbDataReader
SqlDataSource1.DataBind()
sConnection = SqlDataSource1.ConnectionString
oConnection.Open()
sql = "select * from data;"
comd = New OleDbCommand(sql, oConnection)
dtreader = comd.ExecuteReader
etc ...
My problem is this: suppose field1 is filled in each row, but field2 only
the last record. If the value of that last record is alfanumeric (e.g. a)
then no problem, dtreader can fetch it, but if it's numeric (e.g. 1),
dtreader doesn't fetch it (no value). When checking it with response.write,
i see the 'a' but no the 1.
The threshold is, according to trial and error, 25 rows. If the first 25
rows or more are empty, the numeric value in row 30 is 'lost', but not with
'a'.
Any acceptable reason for this?
Thanks
André
I don't now whether this is a problem with excel, with oledb provider or
asp.net, so i send it to those groups.
I created a table in excel with, to simplify, two fields and 30 records.
Now i fetch the values from that table with classic commands like:
Dim oConnection As OleDbConnection
Dim sConnection As String
oConnection = New OleDbConnection()
Dim comd As OleDbCommand
Dim dtreader As OleDbDataReader
SqlDataSource1.DataBind()
sConnection = SqlDataSource1.ConnectionString
oConnection.Open()
sql = "select * from data;"
comd = New OleDbCommand(sql, oConnection)
dtreader = comd.ExecuteReader
etc ...
My problem is this: suppose field1 is filled in each row, but field2 only
the last record. If the value of that last record is alfanumeric (e.g. a)
then no problem, dtreader can fetch it, but if it's numeric (e.g. 1),
dtreader doesn't fetch it (no value). When checking it with response.write,
i see the 'a' but no the 1.
The threshold is, according to trial and error, 25 rows. If the first 25
rows or more are empty, the numeric value in row 30 is 'lost', but not with
'a'.
Any acceptable reason for this?
Thanks
André