Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC() Not Consistent with Data Types
Message
 
 
À
28/06/2011 12:59:35
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01516317
Message ID:
01544644
Vues:
56
>>I am gathering data from an Excel 2010 workbook into VFP 9 SP2 using ODBC via SQLSTRINGCONNECT(). The cursor created by SQLEXEC() creates two columns of data (among many other columns) that should be of the same data type, but one is coming into VFP as data type "B" (double) and the other as data type "M" (Memo). The double field is causing me to loose the character data that also resides in the column.
>
>You're letting the ODBC driver decide the type of data for each column. You can't really know what it will do. I've seen Excel do weird things (search my blog for Excel), and I expect the driver comes from the same kitchen.
>
>The only sure-fire way that I've found for retrieving data from Excel is automation, using .cell(nRow, nCol).text, and sometimes .cell(nRow, nCol).value (but .value is often buggy - Excel may interpret some cells as numbers, even though most of the column contains strings).

I am using Craig Boyd's AppendFromExcel program. I found that it truncates Memo fields to 255 characters only. Do you know if I can fix something in the Excel file for this to work or what should I change in that program?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform