Database fields get cut off in Excel

A

Ann Rossi

Hi,
I've set up a simple query to a Sybase database (select * from tablename) where
some of the fields contain text strings. No matter what I've tried (not that I'm
an expert in Excel), the text is cut off after a few characters in a seemingly
random way (in some cases, I get 5 characters and in others 14).
Anybody know how to fix this?
Any help is much appreciated, Ann Rossi, (e-mail address removed)
 
A

AA2e72E

I've never used Sybase. Some clues:

1. Excel truncates cell contents after 255 characters.
2. If your query determines a column to be numeric (scanning n rows only)
and then finds that some rows have characters, those rows are lost.

You might consider researching SCHEMA.INI on Google.
 
A

Ann Rossi

Thanks for your message, but the strings aren't that long. I have one column
consisting of a bunch of rows with the word "unknown". It's neither a number
nor anywhere near 256 characters and it's displayed as "unk". BTW I'm using
Excel 2000 if that makes any difference.

Thanks, Ann Rossi, (e-mail address removed)
 
T

Tim Williams

You don't say how you're running your query but if you're not using
ADO you might consider switching to that. See the example below: you
will have to adjust the connection string to connect to a sybase db.
Second link has connection string examples.

http://groups.google.com/groups?hl=...=sybase+ado+excel&hl=en&lr=&lr=&start=10&sa=N

http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForSybase

If you're already using ADO then you might consider posting the actual
code you're using.

Tim.
 
J

Jamie Collins

AA2e72E said:
I've never used Sybase.
If your query determines a column to be numeric (scanning n rows only)
and then finds that some rows have characters, those rows are lost.
You might consider researching SCHEMA.INI on Google.

I think you may have mistaken Sybase for a text file.

Jamie.

--
 
A

Ann Rossi

I'm faily new at using Excel, so bear with the stupid questions:
What's ADO? And what do you mean by code? I just used the MS Query
wizard to set up the query and the connection to the database.
I've been playing around with this some more and discovered that a)
this works with Excel 97 (no fields are cut off) and b) the result of
the query is displayed correctly in the MS query window.

Ann Rossi.
 

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

Top