 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 10th, 2004, 05:39 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Create Temporary Table
Hi Guys,
How do I create a temporary table and destroy it afterwards. This temporary table will have a recordset coming from another table and will also have other information coming from a user input. I am using ADO Connection. If someone can please me a sample code or give me a book or site I can look at so I can create this temp table. I appreciate all the help you can extend me.
Cheers,
Judy
|
|

March 10th, 2004, 06:36 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
what DBMS are you going to use?
... there is always more to learn...
|
|

March 11th, 2004, 10:22 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I will be using ACCESS 2000.
|
|

March 11th, 2004, 12:41 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I was able to look at some sample Create table codes. After adding this create table code I am getting this error code:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in CREATE TABLE statement.
/MainServer/Main.asp, line 371
below is my create table code. I am using Microsoft.Jet.OLEDB.4.0 ACCESS 2000. Please someone, I need help on this. Is it because Jet OLEDB 4.0 does not support this create table? If not then what should I do? Any suggestions? Thanks.
set rsTempTb = Server.CreateObject("ADODB.Recordset")
sqlString = "CREATE TABLE Names (FirstName TEXT (20), LastName TEXT (20), DateOfBirth DATETIME, CONSTRAINT MultiConstraint UNIQUE(FirstName, LastName, DateOfBirth) )"
rsCART.Open sqlString, objconn, adOpenKeyset,adLockOptimistic
|
|

March 11th, 2004, 12:45 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am sorry I did a Typing error when I posted the create table code.
The .open statement was suppose to be :
rsTempTb.Open sqlString, objconn, adOpenKeyset,adLockOptimistic
Thanks,
Judy
|
|

March 11th, 2004, 01:00 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Okay. After playing with it some more I was finally able to create it. My mistake was I was creating a table and a recordset at the same time. What I did was :
sqlString = "CREATE TABLE Names (FirstName TEXT (20), LastName TEXT (20), DateOfBirth DATETIME, CONSTRAINT MultiConstraint UNIQUE(FirstName, LastName, DateOfBirth) )"
objconn.Execute (strSQL)
This created a table. Now I have to figure out how to delete or destroy this table after session is over.
Thanks,
Judy
|
|
 |