Solved

DB2 on AS400: Create a temp table from VB

Posted on 2000-05-09
6
733 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
DataMirror Latency 3 95
Monitor SQL Insert 8 122
As400 - Remote Journaling on system journal 8 87
Error in ANZUSROBJ 13 36
We asked our MSP customer base what their favorite tools were and how they help them serve clients. We focused our questions on favorite tools in the following categories: >PSA tools >RMM tools >Alert management tools >Communication tools and Mo…
How many times a day do you open, acknowledge, or close an IT incident? What’s your process? Do you have a process depending on the incident, systems involved, and other factors? New Relic Alerts gives you options for how you interact with notifica…
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

759 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