Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RS not reading data correctly

Status
Not open for further replies.

tls9923

Technical User
Aug 7, 2002
155
US
I have a VB application that is reading a xls or csv file. It reads the file using ADO into a Record set. It reads some of the records correctly but sometimes it will read blanks on XLS or NULL on csv. I have checked the file and data does exsist. I can read the data correctly using FSO.

Any Ideas
 
does the set up of the RS match though... Is it that Column A started out with low numbers and all of a sudden jumps up to 2 million. You may have started reading it in as integer and then this large nubmer does not fit into an integer so you get NULL instead

Casper

There is room for all of gods creatures, "Right Beside the Mashed Potatoes".
 
Currently it is a mix of numric and alphanumeric. It reads the numbers correctly. It appears that the field.type is set to integer. Is there any way to change that since I am reading alphanumerics?
 
The problem is with the Excel driver - it only looks ahead a view lines to determine the field types. You can force the field to be text by using the Data/Text to Columns menu option. Select the column you want to be set to text, then go thru the dialogs until you see the data type selections - then choose text. Don't use the format/cells to text option - that won't do what you want.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top