Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CA UpdateCmd Syntax Error
Message
De
03/03/2003 19:17:40
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00760582
Message ID:
00760642
Vues:
23
Hey Mark,

I don't see anything wrong. Have you tried setting CA.BreakOnError to .t. and then paring down the statement, clause by clause until it stops breaking?

>Using the Northwind sample database in VFP [not MSDE], I have the following in my UpdateCmd property:
>update customers set ;
> COMPANYNAME = ?RTRIM(crsCustomers.COMPANYNAME), ;
> CONTACTNAME = ?RTRIM(crsCustomers.CONTACTNAME), ;
> CONTACTTITLE = ?RTRIM(crsCustomers.CONTACTTITLE), ;
> ADDRESS = ?RTRIM(crsCustomers.ADDRESS), ;
> CITY = ?RTRIM(crsCustomers.CITY), ;
> REGION = ?RTRIM(crsCustomers.REGION), ;
> POSTALCODE = ?RTRIM(crsCustomers.POSTALCODE), ;
> COUNTRY = ?RTRIM(crsCustomers.COUNTRY), ;
> PHONE = ?RTRIM(crsCustomers.PHONE), ;
> FAX = ?RTRIM(crsCustomers.FAX) ;
>where CustomerID = ?crsCustomers.CustomerID
>I modified the formatting above for readability, just remove the semi-colons and CRLFs to get the actual string. AERROR() is returning "Error 10: Syntax error" when the CA uses this for the update of the source table. [llRetVal = TABLEUPDATE(1, .f., 'crsCustomers') returns FALSE.] The cursor crsCustomers does exist and its structure is identical to the source table, Customers, in the Northwind DBC. I also have SET DATABASE TO NORTHWIND in the BeforeOpenTables of the DE. For the life of me, I can not figure out what could be wrong with this UpdateCmd. Any clues appreciated. TIA!
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform