Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error trying to save changed web data
Message
 
À
09/04/2004 11:26:25
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00893053
Message ID:
00893732
Vues:
15
Jason,
Thank you.
I think you're right... I did cut and paste.
What you're seeing is ignorance in action... exciting isn't it!

Someday I'll be better at VB.Net, in the meantime, thanks for putting up with me.

I made some changes and now I'm getting it to save my edit...
It saved it to the wrong record, but from where I was, that's an improvement.

Thanks,
Rick

>Richard,
>I don't think you're too far away from what you need. If you look at your update statement here:
>
>> ' Create the UpdateCommand.
>> oledbCMD = New OleDbCommand("UPDATE Contacts SET Company= MyCompany
>>WHERE Unique_ID = MyContacts_Unique_ID", oledbConn)
>> oledbCMD.Parameters.Add("@Company", OleDbType.Char, 50, "Company")
>> oledbCMD.Parameters.Add("@Contact", OleDbType.VarChar, 50, "Contact")
>> oledbDA.UpdateCommand = oledbCMD
>
>
>you'll see that you're essentially telling the database to set the Company field to a value MyCompany (which probably isn't defined at the database) where the Unique_ID field = the value MyContact_Unique_ID (which probably also isn't defined at the database).
>
>Notice, also, you're adding parameters (@Company and @Contact) to your command object that don't match your UPDATE statement -- maybe a copy and paste error?
>
>There's a good example in the 2003 help documentation for OleDB parameter creation... search for "using parameters with a dataadapter"
>
>Hope that gets you on the right track.
>---J
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform