Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server upsize - Logical to Bit error
Message
De
29/05/2007 00:48:55
Aman Bains
Jaguar Computers
Jalandhar, Inde
 
 
À
25/05/2007 17:16:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01228418
Message ID:
01228980
Vues:
13
>>
>>Upsizing a database causes error:
>>Error # 11 in ConvertVfpLogicalToSqlServerBit(0). Function argument value, type or count is Invalid.
>>This error is shown when a logical field is present in the table and the data is being sent to SQL Server.

>>The Sedna Feb 2007 CTP upsizing is also showing same error. What should I do to upsize the Data?

>Check for the following:
>1. Do you have this character, "~", inside any character field in that particular table?
>2. Is your SET NULLDISPLAY set to the "~" as well.

>If any the above is true, make sure you replace the "~" data and retry.

>This is based on the current Upsizing code found in VFP8SP1 as noted.
>* Use tilde rather than comma in case commas in char fields
>#define BULK_INSERT_FIELD_DELIMITER ~

>This is long shot but regardless, having a "~" inside a character field will make the final text file bad form. This is an example of a badformed text file.
*create table (tcTargetDbfFile) (fld1 i, fld2 l null, fld3 c(5) null, fld4 d)
*insert into test (fld1,fld2,fld3 ) values (1,.t.,null)
*insert into test (fld1,fld2,fld3 ) values (1,.t.,"~")
*insert into test (fld1,fld2,fld3 ) values (1,.t.,null)
*Final text file content:
1~1~~01/01/1900
1~1~~~01/01/1900 <-- the fdl3,record#2 data caused a bad STUFF().
1~T~~01/01/1900  <-- the .T. wasn't translated to 1 properly.
I checked char fields & none has any '~' tilde in it.
checked NULLDISPLAY as well.
Still same ERROR, or bulkInsert. String too long error is shown.

If I allow nulls for all char fields then the upsizing is successful.
allow nulls for any 1 or few char fields is not successful, only selecting all char fields avoids the error.
Aman
-------
Lets fly away to the Land where there is Love & Peace
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform