Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 10th, 2004, 05:39 PM
Friend of Wrox
Points: 1,035, Level: 12
Points: 1,035, Level: 12 Points: 1,035, Level: 12 Points: 1,035, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , USA.
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default 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

Reply With Quote
  #2 (permalink)  
Old March 10th, 2004, 06:36 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

what DBMS are you going to use?


... there is always more to learn...
Reply With Quote
  #3 (permalink)  
Old March 11th, 2004, 10:22 AM
Friend of Wrox
Points: 1,035, Level: 12
Points: 1,035, Level: 12 Points: 1,035, Level: 12 Points: 1,035, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , USA.
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

I will be using ACCESS 2000.

Reply With Quote
  #4 (permalink)  
Old March 11th, 2004, 12:41 PM
Friend of Wrox
Points: 1,035, Level: 12
Points: 1,035, Level: 12 Points: 1,035, Level: 12 Points: 1,035, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , USA.
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

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


Reply With Quote
  #5 (permalink)  
Old March 11th, 2004, 12:45 PM
Friend of Wrox
Points: 1,035, Level: 12
Points: 1,035, Level: 12 Points: 1,035, Level: 12 Points: 1,035, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , USA.
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

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

Reply With Quote
  #6 (permalink)  
Old March 11th, 2004, 01:00 PM
Friend of Wrox
Points: 1,035, Level: 12
Points: 1,035, Level: 12 Points: 1,035, Level: 12 Points: 1,035, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , USA.
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create generic XSL Template to create table Venkatachalapathy XSLT 5 March 11th, 2008 07:49 AM
Temporary table in a shopping cart project ann03 ASP.NET 2.0 Professional 1 October 5th, 2007 07:50 PM
How to create a Temporary Table fdtoo SQL Server 2000 0 April 11th, 2006 08:38 PM
Oracle global temporary table and VB akmhasan Pro VB Databases 0 May 9th, 2005 11:31 PM



All times are GMT -4. The time now is 03:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.