Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Creating table on the fly


Message #1 by Talon Wolles <ta_iwo@y...> on Sun, 22 Dec 2002 17:51:01 -0800 (PST)
hello,

1)first u create one temporary table whatever the fields u want from base
table and give different names to the columns.

2)suppose if u want to get the fields to temporary table from base table
follow these lines

for example base table ka recordset rs
temp table ka recordset rs1

  rs1.fields(name).value=rs.filds(name).value

in this fashion u are getting the values.
try this method



-----Original Message-----
From: Toby Bascom [mailto:ThomasOBascom@c...]
Sent: Saturday, December 28, 2002 2:23 PM
To: professional vb
Subject: [pro_vb] Re: Creating table on the fly



>From: Talon Wolles <ta_iwo@y...>
>Date: Thu, 26 Dec 2002 17:52:56 -0800 (PST)
>  I am coding in VB6 using Access2000 as my database.
>  How can I create an empty table from another table
>  (may have records) but give it a different name on
>  the fly?

1. Copy table and contents:

    SELECT * INTO NewTable FROM ExistingTable

2. Copy table structure ONLY

    SELECT * INTO NewTable FROM ExistingTable WHERE 1=0

Regards,
-Toby




  Return to Index