Article View: free.it.visual-basic
Article #635Modifica record ado.net
From: Massimo
Date: Tue, 21 Feb 2006 00:06
Date: Tue, 21 Feb 2006 00:06
39 lines
2346 bytes
2346 bytes
Vorrei salvare le modifiche apportate in un campo del record con ado.net.
in vb6 facevo cos�:
rs("Cognome")="Rossi"
rs.update
e il gioco era fatto
ora � un macello, non si capisce niente, ho provato queste due soluzioni, ma
nessuna funziona:
-------------------------------------------------------------------
1� prova:
Dim cmdBuild As New OleDbCommandBuilder(da2)
Me.tblVideoteca.Rows(x)("Titolo") = Me.Titolo.Text
Me.da2.Update(ds.Tables("QueryVideoteca"))
Me.da2.UpdateCommand = cmdBuild.GetDeleteCommand()
Me.da2.DeleteCommand = cmdBuild.GetDeleteCommand()
MsgBox(da2.Update(ds, "QueryVideoteca"))
ds.AcceptChanges()
------------------------------------------------------------------------
2� Prova:
Dim myrow As DataRow = Me.tblVideoteca.Rows(x)
myrow.BeginEdit()
myrow("Titolo") = Me.Titolo.Text
myrow.AcceptChanges()
Me.tblVideoteca.AcceptChanges()
Me.ds.AcceptChanges()
Me.da2.Update(myrow("Titolo") = Me.Titolo.Text)
------------------------------------------------------------------------
ho realizzato un bel progetto, ma mi manca solo questo cavolo di
aggiornamento che non riesco in nessuna maniera. se qualcuno riesce a dare
un'occhiata al mio codice e dirmi dove sto sbagliando gliene sarei grato,
magari effettuandomi le correzioni necessarie. grazie e ciao
Technical Details
Message-ID:
<43fa5972$0$12595$4fafbaef@reader3.news.tin.it>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!feeder.news.tin.it!spool.news.tin.it!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f94ee,d8ec56a1730b5db,start X-Google-Attributes: gidf94ee,public X-Google-Language: ITALIAN,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!feeder.news.tin.it!spool.news.tin.it!not-for-mail From: "Massimo" <nospam@nospam.it> Newsgroups: free.it.visual-basic Subject: Modifica record ado.net Date: Tue, 21 Feb 2006 01:06:12 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-Antivirus: avast! (VPS 0608-0, 20/02/2006), Outbound message X-Antivirus-Status: Clean Lines: 41 Message-ID: <43fa5972$0$12595$4fafbaef@reader3.news.tin.it> Organization: TIN.IT (http://www.tin.it) X-Comments: Please send technical notifications to newsmaster@tin.it NNTP-Posting-Host: 87.6.243.97 X-Trace: 1140480371 reader3.news.tin.it 12595 87.6.243.97:2525 X-Complaints-To: Please send abuse reports to abuse@tin.it