MS Query Results

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hi Suz,
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top