Mabey I'm missing something very basic, but I can't seem to get it to
work. I'm trying to follow along in the sample programs that tells how
to do that, but mine still doesn't work.
In my program I want to do a select from one database, and insert some
stuff into another database. I've got all the connects and disconnects
declared and the pre-compile doesn't complain about any of that, but
when I say bldapp, the precompiler does say that the table name in my
insert statment (the second database) is not found.
How do you get bldapp to bind to 2 databases? It seems I have to say
either one or the other for the bldapp part. Is there another utility?
--------------------------------------------------------------------------------------
$ ./bldapp vpmsync lcar14
Database Connection Information
Database server = DB2/AIX64 8.2.1
SQL authorization ID = VPMSYNC
Local database alias = LCAR14
LINE MESSAGES FOR vpmsync.sqC
------ --------------------------------------------------------------------
SQL0060W The "C++" precompiler is in progress.
161 SQL0204N "LCAENV.PART_LIST" is an undefined name.
SQLSTATE=42704
SQL0091W Precompilation or binding was ended with "0"
errors and "1" warnings.
LINE MESSAGES FOR utilemb.sqC
------ --------------------------------------------------------------------
SQL0060W The "C++" precompiler is in progress.
SQL0091W Precompilation or binding was ended with "0"
errors and "0" warnings.
LINE MESSAGES FOR vpmsync.bnd
------ --------------------------------------------------------------------
SQL0061W The binder is in progress.
161 SQL0204N "LCAENV.PART_LIST" is an undefined name.
SQLSTATE=42704
SQL0082C An error has occurred which has terminated
processing.
SQL0092N No package was created because of previous errors.
SQL0091N Binding was ended with "3" errors and "0" warnings.
--------------------------------------------------------------------------------------
if I say bldapp vpmsync vpm15 (the second datbase) it tells me my select
table reference (the first database) is not found. So how is bldapp
support 2 different databases?
Thanks for any input
Ken 6 2675
yoyo wrote: Mabey I'm missing something very basic, but I can't seem to get it to work. I'm trying to follow along in the sample programs that tells how to do that, but mine still doesn't work.
In my program I want to do a select from one database, and insert some stuff into another database. I've got all the connects and disconnects declared and the pre-compile doesn't complain about any of that, but when I say bldapp, the precompiler does say that the table name in my insert statment (the second database) is not found.
How do you get bldapp to bind to 2 databases? It seems I have to say either one or the other for the bldapp part. Is there another utility?
--------------------------------------------------------------------------------------
$ ./bldapp vpmsync lcar14
Database Connection Information
Database server = DB2/AIX64 8.2.1 SQL authorization ID = VPMSYNC Local database alias = LCAR14
LINE MESSAGES FOR vpmsync.sqC ------ -------------------------------------------------------------------- SQL0060W The "C++" precompiler is in progress. 161 SQL0204N "LCAENV.PART_LIST" is an undefined name. SQLSTATE=42704 SQL0091W Precompilation or binding was ended with "0" errors and "1" warnings.
LINE MESSAGES FOR utilemb.sqC ------ -------------------------------------------------------------------- SQL0060W The "C++" precompiler is in progress. SQL0091W Precompilation or binding was ended with "0" errors and "0" warnings.
LINE MESSAGES FOR vpmsync.bnd ------ -------------------------------------------------------------------- SQL0061W The binder is in progress. 161 SQL0204N "LCAENV.PART_LIST" is an undefined name. SQLSTATE=42704 SQL0082C An error has occurred which has terminated processing. SQL0092N No package was created because of previous errors. SQL0091N Binding was ended with "3" errors and "0" warnings.
--------------------------------------------------------------------------------------
if I say bldapp vpmsync vpm15 (the second datbase) it tells me my select table reference (the first database) is not found. So how is bldapp support 2 different databases?
Thanks for any input
Ken
Ok, I found bldmc, which is for building applications with multiple
connections, but I can't figure how to use it yet.
It says:
--------------------------------------------------------------------------------------
# SCRIPT: bldmc
# Builds AIX C++ multi-connection applications
# Requires a second database: <alias2>. Suggested name: sample2
# Also requires 3 program source files: <prog_name> and <prog_name1> to be
# bound to the first database; <prog_name2> to be bound to the second
database.
if (($# < 3))
then
echo "Usage: bldmc <prog_name> <alias1> <alias2> [ <uid1> <pwd1>
<uid2> <pwd2> ]"
exit
fi
--------------------------------------------------------------------------------------
if just issue bldmc vpmsync lcar14 vpm15 it just runs the precomiler
twice, each time crapping out on references to the "other" databases
tables. What does that needing 3 program files mean? I thought DB2 was
supposed to support multiple connections in one file, do I have to break
this thing apart or something and it builds 1 executable in the end?
"yoyo" <yo**@ma.com> wrote in message
news:Os********************@centurytel.net... yoyo wrote: Mabey I'm missing something very basic, but I can't seem to get it to work. I'm trying to follow along in the sample programs that tells how to do that, but mine still doesn't work.
In my program I want to do a select from one database, and insert some stuff into another database. I've got all the connects and disconnects declared and the pre-compile doesn't complain about any of that, but when I say bldapp, the precompiler does say that the table name in my insert statment (the second database) is not found.
How do you get bldapp to bind to 2 databases? It seems I have to say either one or the other for the bldapp part. Is there another utility?
Break your code into two sqc files, each with the code to interact with one
database (file1 = connect/disconnect/select, file2 =
connect/disconnect/insert). Prep each one against the respective databases.
Then link them together along with some glue code that calls the "select"
code for database1 and passes the results to the "insert" code for
database2.
Or you could abandon static C and use CLI instead. Since CLI is all
dynamic, there is no explicit prep step at compilation time, which avoids
the problem you are encountering.
--
Matt Emmerton
Matt Emmerton wrote: "yoyo" <yo**@ma.com> wrote in message news:Os********************@centurytel.net...
yoyo wrote:
Mabey I'm missing something very basic, but I can't seem to get it to work. I'm trying to follow along in the sample programs that tells how to do that, but mine still doesn't work.
In my program I want to do a select from one database, and insert some stuff into another database. I've got all the connects and disconnects declared and the pre-compile doesn't complain about any of that, but when I say bldapp, the precompiler does say that the table name in my insert statment (the second database) is not found.
How do you get bldapp to bind to 2 databases? It seems I have to say either one or the other for the bldapp part. Is there another utility?
Break your code into two sqc files, each with the code to interact with one database (file1 = connect/disconnect/select, file2 = connect/disconnect/insert). Prep each one against the respective databases. Then link them together along with some glue code that calls the "select" code for database1 and passes the results to the "insert" code for database2.
Or you could abandon static C and use CLI instead. Since CLI is all dynamic, there is no explicit prep step at compilation time, which avoids the problem you are encountering.
-- Matt Emmerton
Thanks. Breaking it up works well, a size benefit is it's a little more
organized.
Not really a DB2 programmer, mucking in territory I really shouldn't be
here, but got no choice, customer demands are needing solution. Is CLI
better? I thought I was using CLI, guess not.
"yoyo" <yo**@ma.com> wrote in message
news:Ho********************@centurytel.net... Matt Emmerton wrote: "yoyo" <yo**@ma.com> wrote in message news:Os********************@centurytel.net...
yoyo wrote:
Mabey I'm missing something very basic, but I can't seem to get it to work. I'm trying to follow along in the sample programs that tells how to do that, but mine still doesn't work.
In my program I want to do a select from one database, and insert some stuff into another database. I've got all the connects and disconnects declared and the pre-compile doesn't complain about any of that, but when I say bldapp, the precompiler does say that the table name in my insert statment (the second database) is not found.
How do you get bldapp to bind to 2 databases? It seems I have to say either one or the other for the bldapp part. Is there another utility?
Break your code into two sqc files, each with the code to interact with
one database (file1 = connect/disconnect/select, file2 = connect/disconnect/insert). Prep each one against the respective
databases. Then link them together along with some glue code that calls the
"select" code for database1 and passes the results to the "insert" code for database2.
Or you could abandon static C and use CLI instead. Since CLI is all dynamic, there is no explicit prep step at compilation time, which
avoids the problem you are encountering.
-- Matt Emmerton
Thanks. Breaking it up works well, a size benefit is it's a little more organized. Not really a DB2 programmer, mucking in territory I really shouldn't be here, but got no choice, customer demands are needing solution. Is CLI better? I thought I was using CLI, guess not.
The choice between static versus CLI depends on a lot of things. A thorough
reading of the Application Developer's guide is in order.
--
Matt Emmerton
Matt Emmerton wrote: "yoyo" <yo**@ma.com> wrote in message news:Ho********************@centurytel.net...
Matt Emmerton wrote:
"yoyo" <yo**@ma.com> wrote in message news:Os********************@centurytel.net...
yoyo wrote:
>Mabey I'm missing something very basic, but I can't seem to get it to >work. I'm trying to follow along in the sample programs that tells how >to do that, but mine still doesn't work. > >In my program I want to do a select from one database, and insert some >stuff into another database. I've got all the connects and disconnects >declared and the pre-compile doesn't complain about any of that, but >when I say bldapp, the precompiler does say that the table name in my >insert statment (the second database) is not found. > >How do you get bldapp to bind to 2 databases? It seems I have to say >either one or the other for the bldapp part. Is there another utility?
Break your code into two sqc files, each with the code to interact with one database (file1 = connect/disconnect/select, file2 = connect/disconnect/insert). Prep each one against the respective databases. Then link them together along with some glue code that calls the "select" code for database1 and passes the results to the "insert" code for database2.
Or you could abandon static C and use CLI instead. Since CLI is all dynamic, there is no explicit prep step at compilation time, which avoids the problem you are encountering.
-- Matt Emmerton
Thanks. Breaking it up works well, a size benefit is it's a little more organized. Not really a DB2 programmer, mucking in territory I really shouldn't be here, but got no choice, customer demands are needing solution. Is CLI better? I thought I was using CLI, guess not.
The choice between static versus CLI depends on a lot of things. A thorough reading of the Application Developer's guide is in order.
-- Matt Emmerton
A classic case of: RTFM. I'm guilty as charged.
Matt Emmerton wrote: "yoyo" <yo**@ma.com> wrote in message news:Ho********************@centurytel.net...
Matt Emmerton wrote:
"yoyo" <yo**@ma.com> wrote in message news:Os********************@centurytel.net...
yoyo wrote:
>Mabey I'm missing something very basic, but I can't seem to get it to >work. I'm trying to follow along in the sample programs that tells how >to do that, but mine still doesn't work. > >In my program I want to do a select from one database, and insert some >stuff into another database. I've got all the connects and disconnects >declared and the pre-compile doesn't complain about any of that, but >when I say bldapp, the precompiler does say that the table name in my >insert statment (the second database) is not found. > >How do you get bldapp to bind to 2 databases? It seems I have to say >either one or the other for the bldapp part. Is there another utility?
Break your code into two sqc files, each with the code to interact with one database (file1 = connect/disconnect/select, file2 = connect/disconnect/insert). Prep each one against the respective databases. Then link them together along with some glue code that calls the "select" code for database1 and passes the results to the "insert" code for database2.
Or you could abandon static C and use CLI instead. Since CLI is all dynamic, there is no explicit prep step at compilation time, which avoids the problem you are encountering.
-- Matt Emmerton
Thanks. Breaking it up works well, a size benefit is it's a little more organized. Not really a DB2 programmer, mucking in territory I really shouldn't be here, but got no choice, customer demands are needing solution. Is CLI better? I thought I was using CLI, guess not.
The choice between static versus CLI depends on a lot of things. A thorough reading of the Application Developer's guide is in order.
-- Matt Emmerton
Thanks for your help! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave |
last post by:
I am trying to learn .NET with the standard edition of
VC++.NET 2003 Standard edition. When I use the wizard in
the toolbox to connect to a non-microsoft ODBC data
source, I get the error message...
|
by: Frank |
last post by:
Hi
I am a poor student studying towards my MCSD. I have managed to get a
cheapish student version of vb.net. Problem is that this version does not
connect to sql databases and I need it to...
|
by: vikas.bhatia |
last post by:
Is this still true?
http://groups.google.com/group/comp.databases.ibm-db2/browse_thread/thread/58c6c36ce9006d50/778f98749d8e2983?lnk=st&q=DB2+Connect+product+license&rnum=6#778f98749d8e2983
would...
|
by: gwise |
last post by:
We're running DB2 v8.2 (fix pak 11) on Red Hat Linux Enterprise 3
(kernel 2.4.21-32) on Itanium (IA64). For a few months now, we've had
a recurring problem where a shell script that we run nightly...
|
by: Frinavale |
last post by:
How To Use A Database In Your Program
Many .NET solutions are database driven and so many of us often wonder how to access the database. To help you understand the answer to this question I've...
|
by: cberthu |
last post by:
Hi all,
Is it possible to have two connects in the same rexx script to
different DB's?
I have to get data form on DB (with specifics selects and filter out
some values with RExx) and save the...
|
by: Alan Silver |
last post by:
Hello,
Server configuration:
Windows 2003 Server SP2
SQL Server 2000 SP4
..NET v2.0.50727
just built up a new server using the same configuration as my current
one. I even used the same CDs...
|
by: raiza |
last post by:
hi! i'm presently creating a visual basic program which is suppose to be connected in multiple databases.
i've already managed to connect my program to one database in access. however, when i...
|
by: Curtis Rutland |
last post by:
How To Use A Database In Your Program Part II
This article is intended to extend Frinny’s excellent article: How to Use a Database in Your Program. Frinny’s article defines the basic concepts...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |