Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.data.oledb,microsoft.public.dotnet.framework.adonet,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default can't fetch value in excel table if first 25 rows are empty

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   Report Post  
Posted to microsoft.public.data.oledb,microsoft.public.dotnet.framework.adonet,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default can't fetch value in excel table if first 25 rows are empty

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   Report Post  
Posted to microsoft.public.data.oledb,microsoft.public.dotnet.framework.adonet,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default can't fetch value in excel table if first 25 rows are empty

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove 10,000+ empty rows below my table? Frustrated Excel User[_2_] Excel Discussion (Misc queries) 8 April 14th 23 05:34 PM
Hide empty rows in pivot table Excel 2003 menda Excel Discussion (Misc queries) 2 February 20th 08 12:16 PM
Can I fetch multiple rows back using VLOOKUP? Karl Rhodes Excel Worksheet Functions 1 February 26th 07 12:47 PM
How to fetch rows of data across sheets dynamically knowledgehunter Excel Programming 2 December 4th 05 04:09 PM
Fetch list of table names in access to a record set Prashantha Weerakoon Excel Programming 1 May 6th 05 12:26 PM


All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"