Article View: free.it.visual-basic
Article #2354Re: aiuto sql
From: KillerBoy
Date: Mon, 09 Jun 2003 07:13
Date: Mon, 09 Jun 2003 07:13
71 lines
3445 bytes
3445 bytes
la sintassi della update �:
update tabella
set campo1 = valore1,
campo2 = valore2,
...
campoN=valoreN
where campo1=condizione1
and campo2=condizione2
etc...
--
''~``
( o o )
+---.oooO--(_)--Oooo.---+
KillerBoy
______________________
"sara" <sara83@hotmail.com> ha scritto nel messaggio
news:ZyjEa.68296$lK4.2035138@twister1.libero.it...
> Scusate ma non ho molta esperienza in visual basic e sto cercando
> disperatamente un aiuto. Vorrei aggiornare la tebella che ho allegato ma
non
> riesco a collegare le varie stringhe di sql poich� non conosco la
sintassi.
> Ho provato con una sola stringa sql
> (sql = "update lavorazione set prezzo= '" & txtsemplice.Text & "' where
> tecnica='tinta semplice '") e ho visto che aggiona il database ma se provo
a
> porre una virgola subito dopo e a scrivere un'altra stringa mi da errore
di
> sintassi. Ho anche provato a scrivere il codice come riportato di seguito
ma
> in questo modo visual basic aggiorna soltanto l'ultima stringa (nel caso
> specifico quella riguardante il cerato). Se gentilmente qualcuno pu�
> aiutarmi gli sarei veramente grata. Grazie
>
>
>
>
>
>
>
> Set con = CreateObject("adodb.connection")
> Set rs = CreateObject("adodb.recordset")
> strcon = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & App.Path &
> "\impostazioni.mdb"
> con.Open strcon
> sql = "update lavorazione set prezzo= '" & txtsemplice.Text & "' where
> tecnica='tinta semplice '"
> sql = "update lavorazione set prezzo= '" & txtvelatura.Text & "' where
> tecnica='velatura'"
> sql = "update lavorazione set prezzo= '" & txtstracciato.Text & "' where
> tecnica='stracciato'"
> sql = "update lavorazione set prezzo= '" & txtspugnato.Text & "' where
> tecnica='spugnato'"
> sql = "update lavorazione set prezzo= '" & txtsogni.Text & "' where
> tecnica='casa dei sogni'"
> sql = "update lavorazione set prezzo= '" & txtspatolato.Text & "' where
> tecnica='spatolato'"
> sql = "update lavorazione set prezzo= '" & txtstucco.Text & "' where
> tecnica='stucco antico'"
> sql = "update lavorazione set prezzo= '" & txtmarmoriz.Text & "' where
> tecnica='marmorizzato'"
> sql = "update lavorazione set prezzo= '" & txtcerato.Text & "' where
> tecnica='cerato'"
> con.Execute sql
>
>
>
>
Technical Details
Message-ID:
<VsWEa.72482$Ny5.2211709@twister2.libero.it>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mailReferences:
<ZyjEa.68296$lK4.2035138@twister1.libero.it>Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII X-Google-Thread: f94ee,5e4fa03db86d496b X-Google-Attributes: gidf94ee,public X-Google-ArrivalTime: 2003-06-09 00:13:58 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail From: "KillerBoy" <progr@hotmail.com> Newsgroups: free.it.visual-basic References: <ZyjEa.68296$lK4.2035138@twister1.libero.it> Subject: Re: aiuto sql Lines: 72 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 Message-ID: <VsWEa.72482$Ny5.2211709@twister2.libero.it> Date: Mon, 09 Jun 2003 07:13:57 GMT NNTP-Posting-Host: 193.70.27.241 X-Complaints-To: abuse@iunet.it X-Trace: twister2.libero.it 1055142837 193.70.27.241 (Mon, 09 Jun 2003 09:13:57 MET DST) NNTP-Posting-Date: Mon, 09 Jun 2003 09:13:57 MET DST Organization: [Infostrada]