![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hi All, If I am changing the database machine, what should I do not to prep bind the sqc files everytime. Because I need to build my application everytime the database is changed? Is there any way, to do prep bind with "defined timestamp" or something which does not require any prep - binding even when the database is changed. |
#2
| |||
| |||
|
|
If I am changing the database machine, what should I do not to prep bind the sqc files everytime. Because I need to build my application everytime the database is changed? Is there any way, to do prep bind with "defined timestamp" or something which does not require any prep - binding even when the database is changed. You need to distinguish between PREP and BIND. |
#3
| |||
| |||
|
|
Thanks man for your kind help, you mean to say I need to build the application including the .bnd file? |
|
I am now telling you the exact scenario! See suppose I am using a database named DB1, I have .sqc files containing the sql commands. We do prep by the following command at the db2 command line: "db2 prep file1.sqc Version V1.0 bindfile " then I do bind those .sqc by the following command: "db2 bind filename.bnd" Now, suppose we are migrating the application to the new database named DaB2, do we again need to prep the files because if we do need then again the new .C files are getting generated and I am bound to rebuild the application. |
#4
| |||
| |||
|
|
Well what about the sqc file connection string?? Of course it would be change, although I am trying to use system variable yet it is not allowing me to do so.!!!!! Sending you the sample code of connection.sqc char * dname = getenv("DATABASE"); char * username = getenv("USER"); char * password = getenv("PASSWORD"); void Db2connect() { /*********************end of C code*******************************/ Now, even after I bind connection.bnd to the database 1 and database 2, it only accepts the connection to the first database, not the second one.. Can i generalise my .C file so that there are no change required. I am sure my problem is very clear to you. |
![]() |
| Thread Tools | |
| Display Modes | |
| |