Solved

DB2 on AS400: Create a temp table from VB

Posted on 2000-05-09
6
712 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
Comment Utility
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
Comment Utility
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
Comment Utility
xinger your last part of comment regarding accessibilty from other sessions is the very reason I didnt suggest qtemp.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 1

Expert Comment

by:veeramani
Comment Utility
For this question, xinger comment is very good and advisable.

Regards,

Veeramani
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
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
Comment Utility
ZERO reponse to my request above;  therefore finalized today by EE Moderator.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now