Solved

DB2 on AS400: Create a temp table from VB

Posted on 2000-05-09
6
717 Views
Last Modified: 2010-08-05
I'm using an ActiveX DLL in VB6 and I want to create a temporary table on the AS400 DB2 database. I'm accessing the database through ADO via an ODBC data source.
Does any one have the sample code to create the table - I'm new to SQL so I would all the code - or alternatively a link to some documentation.
Thanks
FR
0
Comment
Question by:frgarson
6 Comments
 
LVL 3

Expert Comment

by:P_S_Price
ID: 2796029
If you have a manual on SQL to explain the syntax then you can use the CREATE TABLE SQL command. and DROP Table SQL command.

I can Give you a Link to IBM's AS/400 Infomation Centre which provides Great Info on how to do things in AS/400 and also access to the whole range of AS/400 user guides

http://publib.boulder.ibm.com/pubs/html/as400/v4r4/ic2924/info/INFOCENT.HTM

However as an observation, if the table is only relevant to a single session it may be more advantageous to create the temporary table on your workstation local Disk. AS/400 Disk space is much dearer than PC.
0
 
LVL 2

Accepted Solution

by:
xinger earned 50 total points
ID: 2860357
It depends on how temporal and inaccessible you want your table to be.  Very temporary and private tables can be created in library qtemp.  When created, they exist only as long as your current connection to the AS/400.  When you signoff or disconnect, the table is automatically deleted forever.  But be aware that qtemp tables cannot be seen nor used by anyone else including your other sessions.  It is accessible to only the session that created it.

Syntax to create a temporary table with one column is
CREATE TABLE qtemp.table1
    (columnA char(1))

0
 
LVL 3

Expert Comment

by:P_S_Price
ID: 2863820
xinger your last part of comment regarding accessibilty from other sessions is the very reason I didnt suggest qtemp.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 1

Expert Comment

by:veeramani
ID: 2866326
For this question, xinger comment is very good and advisable.

Regards,

Veeramani
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6401606
This question was LOCKED with a PROPOSED ANSWER and awaits your decision today.  Once a question is LOCKED with a Proposed Answer, few new experts will step in to help on that question, since the assumption is, you've been helped.  If the Proposed Answer helped you, please accept it and award that expert.  If it did not help you, please reject it and add comments as to status and what else is needed.
 
If you wish to award multiple experts, just comment here with detail, I'll respond as soon as possible.  As it stands today, you asked the question, got help and not one expert was awarded for the contribution(s) made.  Your response is needed.  I'll monitor through month end, and if you've not returned to complete this, we'll need to decide.  Expert input is welcome (as always) to determine the outcome here if the Asker does not respond.
 
Your response in finalizing this (and ALL) your question(s) is appreciated.
 
Moondancer
Community Support Moderator @ Experts Exchange

0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6890920
ZERO reponse to my request above;  therefore finalized today by EE Moderator.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question