Solved

DB2 on AS400: Create a temp table from VB

Posted on 2000-05-09
6
725 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IT certifications are a concrete representation of continual learning on the part of the candidate.  Continual learning is necessary for the long term success of an IT professional, but are IT certifications the right path for you?
Most MSPs worth their salt are already offering cybersecurity to their customers. But cybersecurity as a service is wide encompassing and can mean many things.  So where are MSPs falling in this spectrum?
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 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