|
|
|
|
|
| | |
|
Active Server Pages asp search engine active server page asp application components tutorial CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Copying and Creating Tables |
From: |
Harlan |
Date: |
3/8/1999 9:14:08 AM |
IP: |
206.222.20.2 |
I'm pretty sure you can't copy and rename a table in any database, ok I'm almost positively sure. Here is what you need to do instead, I believe. You can use the "create table" sql statement to create a general datatype and structure for your table, and call it as a sub to create a standard table. Here would be an example.
Sub CreateTemplateTable(tblName)
dim sqlCreate 'as string; sql query string
sqlCreate = "create " & tblName & " & _
" ( cmnOne varchar2 constrant pk_One " & _
"primary key, cmnTwo number)"
DBOpen 'a standard sub of mine used in an
'an include, you can just create and .open an 'adodb.connection
DB.Execute(sqlCreate)
DBClose 'same as DBOpen
End Sub
Note: this create table syntax is oracle 7 syntax, not access syntax, I don't really work much with access so I don't know its syntax off hand.
but anyway, you can easy do something like this.
Call CreateTemplateTable("myTable")
Call CreateTemplateTable("HisTable")
Call CreateTemplateTable("yourTable")
your database would now hold |
Previous Message
|
|

|
|
|
|
|
|
|
|
|
|