Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with & amp ; and Ole DB provider
Message
De
12/02/2008 10:41:30
 
 
À
12/02/2008 10:40:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01291818
Message ID:
01291827
Vues:
11
>>>>If I run the following example in VFP command window, all works well. But if I run this code in a VFP stored procedure called via Ole Db provider, the value that goes into the field is blank/empty:
>>>>
>>>>
>>>>
>>>>create table ("MyTest") free ( test_str c(200) )
>>>>
>>>>cTestStr = "Test & test"
>>>>APPEND BLANK IN mytest
>>>>replace test_str WITH cTestStr IN mytest
>>>>
>>>>*-- The value that goes to field TEST_STR is blank when
>>>>*-- calling this code via Ole Db Provider.
>>>>
>>>>
>>>>What am I missing?
>>>Try
>>>cTestStr = "Test " + chr(38) + " test"
>>
>>I will try it. But the point is that the value [& + amp + ";"] (which by the way UT shows here as "&") inserted into the string outside my control.
>>
>>Thank you.
>
>Try to replace the ampersand with some other character, and do a similar replacement afterwards to put it back again. A pair of chrtran() will do the job.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform