Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default MS Query Results

I have an Excel database that I'm querying. One of my fields has code
information: some are just numeric (88523) and some are alphanumeric (P5036).
When I get the results of my query, the alphanumeric fields are left blank.
The rest of the record is intact. I've tried various combinations of
formatting the fields and have not been able to get around this. Does anyone
have a solution?

Thanks
--
Suz
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default MS Query Results

Hi Suz,

Suzseb wrote:
I have an Excel database that I'm querying. One of my fields has code
information: some are just numeric (88523) and some are alphanumeric
(P5036). When I get the results of my query, the alphanumeric fields
are left blank. The rest of the record is intact. I've tried various
combinations of formatting the fields and have not been able to get
around this. Does anyone have a solution?


Excel is guessing at the data type based on the first 8 rows of data in that
column. So if the first 8 are numeric, the ADO field type will be set to
int or similar. If this happens, the alphanumeric data won't fit, so
they're left blank.

There are some registry keys you can modify to get around this (in addition
to adding to your connectionstring):

http://blog.lab49.com/?p=196

This example is talking about ADO.NET, but the same principles should apply
to your situation.

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


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
Web query results in a recordset? quartz[_2_] Excel Programming 4 March 18th 05 09:11 AM
Web Query Sleep for until results come Sunil_Modi Excel Worksheet Functions 0 November 19th 04 04:29 PM
Query Results to UserForm Noel Excel Programming 1 September 29th 04 07:09 PM
MS Query Limit results Gunther[_2_] Excel Programming 2 December 16th 03 08:21 PM
Query Results Michael Burkett Excel Programming 1 November 11th 03 07:46 PM


All times are GMT +1. The time now is 03:52 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"