473,386 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HELP ME problem with *.sqc

Hi to all ng

I 'm a non expert user og db2 and i made a program that it connect to db2
and after goes to a table, verify that exists a value and after return
success or not.

My problem is that for the connection and for the verify I made a library,
all the library and program made in c language, and seems that is not knows
the sql code
the error is SQLSTATE [51002]

For complete informatio i said that this program function right well in db2
version 7.2 but when I transport in db2 v8 after the rebind i have this
problem
thank in advance for all people that can help me

Sergio
Nov 12 '05 #1
4 3018
eap90210 wrote:
Hi to all ng

I 'm a non expert user og db2 and i made a program that it connect to db2
and after goes to a table, verify that exists a value and after return
success or not.

My problem is that for the connection and for the verify I made a library,
all the library and program made in c language, and seems that is not
knows the sql code
the error is SQLSTATE [51002]

For complete informatio i said that this program function right well in
db2 version 7.2 but when I transport in db2 v8 after the rebind i have
this problem


How exactly did you do the "rebind"? SQLSTATE 51002 says that a package
could not be found. So I guess that something in the bind-process didn't
work out as you expected.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2
Thanks to answer me.

I bind the program in this way :
bind carven.bnd

I create this program, called carven, that when it issue call a static
library call libtrk, in order to connect to db and this step is ok.
After execute a cursor, open/fetch, and this step is ok.
After in a loop for every record try to translate a value. for this reason i
call a function in the library. Here happen that all statment before the
query it was execute perfectly but do not execute the query, i don't know
why. After, always in the library, write in the log file the failure 51002.

I start with a devolep machine that is a Unix Aix machine, that have a user
equal to schema equal to istance name

When I copied in the staging machine, the environment is : user is different
from a istance name but is equal to a schema but it different from a schema
of develop machine.

Ah! other program that read a file idoc and write in the load table work
right well.

Regards
Sergio
"Knut Stolze" <st****@de.ibm.com> ha scritto nel messaggio
news:d5**********@fsuj29.rz.uni-jena.de...
eap90210 wrote:
Hi to all ng

I 'm a non expert user og db2 and i made a program that it connect to
db2
and after goes to a table, verify that exists a value and after return
success or not.

My problem is that for the connection and for the verify I made a
library,
all the library and program made in c language, and seems that is not
knows the sql code
the error is SQLSTATE [51002]

For complete informatio i said that this program function right well in
db2 version 7.2 but when I transport in db2 v8 after the rebind i have
this problem


How exactly did you do the "rebind"? SQLSTATE 51002 says that a package
could not be found. So I guess that something in the bind-process didn't
work out as you expected.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena

Nov 12 '05 #3
eap90210 wrote:
Thanks to answer me.

I bind the program in this way :
bind carven.bnd

I create this program, called carven, that when it issue call a static
library call libtrk, in order to connect to db and this step is ok.
After execute a cursor, open/fetch, and this step is ok.
After in a loop for every record try to translate a value. for this reason
i call a function in the library. Here happen that all statment before the
query it was execute perfectly but do not execute the query, i don't know
why. After, always in the library, write in the log file the failure
51002.
Please let me know if I got this right:

(1) you execute same static SQL statements successfully
(2) then you make a call to a function in the "libtrk" library
(3) once you return from the called function, the subsequent static SQL
statements fail with SQLSTATE 51002

Is this correct?

Is static SQL executed in the function(s) in the libtrk library?
Is the logic of (1) and (3) in the same package, i.e. the same transalation
unit/file?
I start with a devolep machine that is a Unix Aix machine, that have a
user equal to schema equal to istance name

When I copied in the staging machine, the environment is : user is
different from a istance name but is equal to a schema but it different
from a schema of develop machine.

Everything is all right on the development machine? And it only fails on
the staging system?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #4
best thanks for your answer

and ..
(1) you execute same static SQL statements successfully Yes ! the first command, I mean the connect, stay in this library
( libtrk ) . After the connection, the main program execute a cursor ( and
it's ok ). after ..
I call again (2) then you make a call to a function in the "libtrk" library Yes for traslate the value ( so exec sql select value1 into
:bind_variable from table1 where condition ( with a primary key ) )
(3) once you return from the called function, the subsequent static SQL
statements fail with SQLSTATE 51002 YES !
Is static SQL executed in the function(s) in the libtrk library? YES
Is the logic of (1) and (3) in the same package, i.e. the same
transalation
unit/file? Sorry but i don't understand very well. This library is call in
order to connect to db2, and s called for traslation. and the first time is
good, after no.
I don't know if it is in same package, i don't know db2, I tell
that the command dump -n carven | more give me the following reult :
***Import File Strings***
INDEX PATH BASE MEMBER
0 /db2v8/inet/sqllib/lib:/db2v8/inet/prgc:/usr/lpp/xlopt:/usr/lib:/lib
1 libc.a shr.o
2 libdb2.a shr.o

So the library is static!

Everything is all right on the development machine? And it only fails on
the staging system?
Yes, I say that the only difference between develop machine than
staging machine is the command get alert configuration for database in the
develop machine, for every idicator name is set to NO instead of in the
staging machine is set to YES.
In the develop machine if I write db2 + enter and after I write
connect the db2 tell me "SQL1024N A database connection does not exist.
SQLSTATE=08003" instead of the staging machine that allow me to enter in db2

thanks in advance

regards

sergio

"Knut Stolze" <st****@de.ibm.com> ha scritto nel messaggio
news:d6**********@fsuj29.rz.uni-jena.de... eap90210 wrote:
Thanks to answer me.

I bind the program in this way :
bind carven.bnd

I create this program, called carven, that when it issue call a static
library call libtrk, in order to connect to db and this step is ok.
After execute a cursor, open/fetch, and this step is ok.
After in a loop for every record try to translate a value. for this
reason
i call a function in the library. Here happen that all statment before
the
query it was execute perfectly but do not execute the query, i don't know
why. After, always in the library, write in the log file the failure
51002.


Please let me know if I got this right:

(1) you execute same static SQL statements successfully
(2) then you make a call to a function in the "libtrk" library
(3) once you return from the called function, the subsequent static SQL
statements fail with SQLSTATE 51002

Is this correct?

Is static SQL executed in the function(s) in the libtrk library?
Is the logic of (1) and (3) in the same package, i.e. the same
transalation
unit/file?
I start with a devolep machine that is a Unix Aix machine, that have a
user equal to schema equal to istance name

When I copied in the staging machine, the environment is : user is
different from a istance name but is equal to a schema but it different
from a schema of develop machine.

Everything is all right on the development machine? And it only fails on
the staging system?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tomislav Lepusic | last post by:
Hello, I don't know if this is the right group (I'm more in Perl, know nothing about Python), so if you can help me thanks, if not, sorry to bother you. I'm working on my student project and...
1
by: the_proud_family | last post by:
HELP ME PLEASE!! my email is the_proud_family@yahoo.com I can't get the ball to go up right side and then I need it to turn around and keep turning until velocity=0 I have been at it for the ...
2
by: Mj23 | last post by:
I'm Italian and I'm sorry for my English!!!I'm new of this ns and so I don't know if my question is suitable. I have a problem: using the C++ language,the QT library and the OpenGL library realize...
0
by: Prasanth U | last post by:
Hi All, We are facing a problem while integrating a HTML help file (chm version 1.x) to our windows .net application (C#). The help topic for the controls in the application are shown using the...
22
by: Rafia Tapia | last post by:
Hi all This is what I have in mind and I will appreciate any suggestions. I am trying to create a xml help system for my application. The schema of the xml file will be <helpsystem> <help...
3
by: Mitchell Thomas | last post by:
I hope someone out there can solve my mysterious problem. I have tried everything imaginable, even paid $35 to Microsoft to help me, but they were not able to figure out this problem: Here is the...
2
by: chanchito_cojones | last post by:
hi there, I am needing some help with a database I am putting together. The database works off of a main Form, which then has buttons on it that will open up other forms. The problem I am having...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
16
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.