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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read a record in excel 2000 with ODBC

Status
Not open for further replies.

Frickydel

Programmer
Sep 10, 2002
5
FR
Hello, (i'm french so please excuse my poor english)

i need to update a DB with informations from an Excel2000 document.
I use ODBC driver for excel, and VB Data Environment to read records in my excel file.
But there is a problem : if the first record contain a field which contain less than 255 chars, all the other records 'll be cut to 255.
Exemple :
first record, the <DESCRIPTION> field contain a text with 200 chars.
second record, the <DESCRIPTION> field is more than 500 chars but only the 255 first chars are selected.

If the first field is more than 255 chars, there is no problem so actually, if some DESCRIPTIONs are more than 255 chars, i move the line to the top of the document but this method is unsatisfactorily

In the DE, in the DESCRIPTION field's property, i can see &quot;size : 255&quot;, but I can't change this value.

Is there a way to fix definitively this value to 1000 chars?

Thank you
 
Are you declaring the variable that you are using. Type Option Explicit at the beginning of your app it may be formating the variable with the first value that it sees.
 
My variable is declared, but it's not working: The problem is that the variable is formated with the first value, but not resized with the 2nd.

it looks like it's not a problem from VB, but from the ODBC driver...
So i don't know how to handle this :(

Thanks for replying

Fricky

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top