Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update a table in a database with a view
Message
De
05/06/2007 05:13:49
 
 
À
05/06/2007 04:42:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01230467
Message ID:
01230484
Vues:
22
>This is my code that doesn't work, maybe you can see the mistake?

well, IMHO one mistake is, that you didn't specify the table where the updates have to go.
So you will need at least this line:
DBSetProp("view5","View","Tables","mydbc!mytable")
Another point is the missing UpdateNames for the updatable fields:
DBSetProp("view5.myfieldname","Field","UpdateName","mydbc!mytable.myfieldname")
>CREATE SQL VIEW view5 AS SELECT &m_selectvelden FROM ALLTRIM(m_dbf2) WHERE SUBSTR(postcode, 1, 2) = >ThisForm.cmbpostcode.DisplayValue

I also would recommend not to use an expression like "...alltrim(m_dbf2)..." in the FROM clause and not using an object reference like "thisform.cmbpostcode.displayvalue" within the SQL statement. But this shouldn't be related to your actual problem.
Holger Vorberg
Germany
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform