Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update command
Message
De
14/05/2008 11:19:06
 
 
À
13/05/2008 23:56:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Titre:
Divers
Thread ID:
01316694
Message ID:
01316995
Vues:
15
>>With .NET, the sqlDataSource builder creates the Updatecommand as thus
>>
>>UpdateCommand="UPDATE [users] SET [username] = ?, [password] = ?, [fullname] = ?, [authlevel] = ?, [email] = ? WHERE [user_id] = ? AND [username] = ? AND [password] = ? AND [fullname] = ? AND [authlevel] = ? AND [email] = ?" >
>>
>>
>>which doesn't seem to work with a VFP table.
>
>You know the CommandBuilder is only intended for MSSQL? It's unlikely to produce anything useful for VFP.
>
>> In this example user_id is the key field defined as an integer.
>
>So it's unlikely you'll want anything other than the user_id in the WHERE clause - unless you're passing in the original values and want the update to fail if someone else has modified the record.
>Regards,
>Viv

Thanks Viv. It works as the others suggested by taking out the square brackets[]. I was leaving the messy WHERE just because that's the way the builder constructed it and I wanted to minimise changes until I had it working. Now that I understand it better I have stripped it down to just the user_id.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform