🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #3117

Re: Aiuto su "INSERT INTO"

#3117
From: albertino80
Date: Mon, 14 Oct 2002 22:16
46 lines
2390 bytes
Aggiungi questo codice:

''''''''''' INIZIO Codice '''''''''''''

Dim aDb as database

set aDb = DbEngine.OpenDatabase("c:\pippo.mdb",false,false,"")

strSql = "INSERT INTO TAB_APPOGGIO SELECT * FROM Tabella where " & 
cmbCriterio.Text & " LIKE '" & DoubleApice(txtValore.Text) & "'"

aDb.execute strSql

aDb.close

''''''''''' FINE Codice '''''''''''''

Ovviamente TAB_APPOGGIO � la tabella di appoggio e deve avere la stessa 
struttura della tua tabella 'Tabella'.
c:\pippo.mdb � il percorso completo del tuo Db.

Fammi sapere, ciao.



Gianni wrote:

>> Ho un grosso bisogno d'aiuto su come riempire una tabella d'appoggio,
>> dopo aver esuguito una query.
>> Porto l'esempio:
>>
>> Dal mio form di ricerca seleziono il criterio e in una textBox la parola
>> chiave sulla quale eseguire la ricerca; poi esuguo una query del tipo:
>>
>> strSql = "SELECT * FROM Tabella where " & cmbCriterio.Text & " LIKE '" &
>> DoubleApice(txtValore.Text) & "'"
>> Data1.RecordSource = strSql
>>
>> a questo punto vedo attraverso un DBGRIG il risultato della query, che ho
>> bisogno di inserire nella "tabella_appogio" utilizzando per quanto ne
> sappia
>> il metodo in oggetto.
>> Mi portate un esempio per capire...
>> Grazie.
>>
>> Lasciate pure i messaggi sul N.G.
Technical Details
Message-ID: <aoffmf$qe$1@lacerta.tiscalinet.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!draco.tiscalinet.it!not-for-mail
References: <wr5k9.7470$Eu.153788@twister1.libero.it>

Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII
X-Google-Thread: f94ee,7188be116f6a450d,start
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2002-10-14 15:24:08 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!draco.tiscalinet.it!not-for-mail
From: albertino80@tiscalinet.it
Newsgroups: free.it.visual-basic
Subject: Re:  Aiuto su "INSERT INTO"
Date: Tue, 15 Oct 2002 00:16:00 +0200
Organization: Tiscali Spa
Lines: 47
Message-ID: <aoffmf$qe$1@lacerta.tiscalinet.it>
References: <wr5k9.7470$Eu.153788@twister1.libero.it>
Reply-To: albertino80@tiscalinet.it
NNTP-Posting-Host: ppp-62-10-42-147.dialup.tiscali.it
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Trace: lacerta.tiscalinet.it 1034633743 846 62.10.42.147 (14 Oct 2002 22:15:43 GMT)
X-Complaints-To: newsadmin@it.tiscali.com
NNTP-Posting-Date: 14 Oct 2002 22:15:43 GMT
Mail-Copies-To: albertino80@tiscalinet.it
User-Agent: KNode/0.7.1