Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.data.oledb,microsoft.public.dotnet.framework.adonet,microsoft.public.excel.programming
|
|||
|
|||
![]()
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é |
#2
![]()
Posted to microsoft.public.data.oledb,microsoft.public.dotnet.framework.adonet,microsoft.public.excel.programming
|
|||
|
|||
![]()
See the following. Look for information on IMEX
http://support.microsoft.com/default...b;en-us;257819 How To Use ADO with Excel Data from Visual Basic or VBA http://www.dicks-blog.com/archives/2...ed-data-types/ -- Regards, Tom Ogilvy "André" <hjhhb@dd wrote in message ... 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é |
#3
![]()
Posted to microsoft.public.data.oledb,microsoft.public.dotnet.framework.adonet,microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks
"Tom Ogilvy" schreef in bericht ... See the following. Look for information on IMEX http://support.microsoft.com/default...b;en-us;257819 How To Use ADO with Excel Data from Visual Basic or VBA http://www.dicks-blog.com/archives/2...ed-data-types/ -- Regards, Tom Ogilvy "André" <hjhhb@dd wrote in message ... 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é |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I remove 10,000+ empty rows below my table? | Excel Discussion (Misc queries) | |||
Hide empty rows in pivot table Excel 2003 | Excel Discussion (Misc queries) | |||
Can I fetch multiple rows back using VLOOKUP? | Excel Worksheet Functions | |||
How to fetch rows of data across sheets dynamically | Excel Programming | |||
Fetch list of table names in access to a record set | Excel Programming |