create new table

create new table

Post by Halil AKINC » Wed, 12 Dec 2001 00:20:11



Hi all,

I'm creating a recordset (called KS) using below ADOobject. I want to write
this recordset's data new access table. How can I create new access table
and fill this table with recordset's data?
----------------------------------------------------------------------------
-------------------------------------
Dim VT as New ADODB.Connection
Dim KS As New ADODB.Recordset
VT.Open "Evbisson"
Set KS = VT.Execute("SELECT SUM(?VergiTutary) As Toplam, vergino, Ad, Soyad
&_
FROM Arsa_beyan &_
GROUP BY vergino, Ad,Soyad")

 
 
 

create new table

Post by Val Mazu » Wed, 12 Dec 2001 02:04:35


Hi,

You can do it withot opening of recordset. Use SELECT INTO
SQl statement

VT.Execute("SELECT SUM(?VergiTutary) As Toplam, vergino,
Ad, Soyad INTO NewTabelName FROM Arsa_beyan GROUP BY
vergino, Ad,Soyad")

Val

Quote:>-----Original Message-----
>Hi all,

>I'm creating a recordset (called KS) using below

ADOobject. I want to write
Quote:>this recordset's data new access table. How can I create
new access table
>and fill this table with recordset's data?
>----------------------------------------------------------
------------------
>-------------------------------------
>Dim VT as New ADODB.Connection
>Dim KS As New ADODB.Recordset
>VT.Open "Evbisson"
>Set KS = VT.Execute("SELECT SUM(?VergiTutary) As Toplam,
vergino, Ad, Soyad
>&_
>FROM Arsa_beyan &_
>GROUP BY vergino, Ad,Soyad")

>.


 
 
 

create new table

Post by Luke Zhang [M » Thu, 13 Dec 2001 17:50:08


Hi Halil,

I don't think you have to create a recordset to achieve this. You can use
the "Select into" statement. For example,

VT.Execute "select * into table1 from table2"

Luke

(This posting is provided ?AS IS?, with no warranties, and confers no
rights.)