If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Error -805 when i execute my program on multiple databases

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-30-06, 04:40
cyberioio cyberioio is offline
Registered User
 
Join Date: Oct 2006
Posts: 5
Error -805 when i execute my program on multiple databases

Hi,

I want to migrate in DB2 some programs with sql embedded.
These programs are .sqc files that i pre-compile with the db2 script "embprep" to obtain .c files which are finally compiled with gcc.

I have to take the database name in parameter for the pre-compilation.
But if i want to launch my .exe file on another database, i have the following error :
-805 : DBRM OR PACKAGE NAME NOT FOUND IN PLAN

The solution consists of recompile my program with the other database name, but i cannot use this solution for my multi-database application.

Is it possible to generate unique executable files which work on any database ?

Thanks in advance.

Kind regards

Lionel

NB : Excuse-me for the translation, I'm not used to write in English.
Reply With Quote
  #2 (permalink)  
Old 10-30-06, 12:42
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
bind

you should execute another command first to create a bind file (will look this up)
use the bind-file to bind against each db that is involved in the program.
db2 connect to x
db2 bind xxx.bnd ..
and repeat as needed
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On