Home > database > PB9 how to connect two oracle database at the same time
PB9 how to connect two oracle database at the same time
Time:10-14
Such as topic, this machine is installed two oracle8 client (hereafter call for client1 and client2 respectively), client1 is English character set, client2 is Chinese character set, PB is always the default configuration file path to the client1 to search the connection information, it is the connection client2 failed, is there any way to connect two different methods of oracle database at the same time? Supplement: I try to install the client2 oracle9 client, the result is the same
CodePudding user response:
I pour! And PB holdouts! PB only one default transaction object Application object and specialized object database connection, the application only has connections with a database, it is ok to use the SQLCA directly as the transaction object, only when the application with multiple database connections, just need to create your own transaction object, transaction object is not visible, resident in memory, Original concept and database communication steps are as follows: 1. Set the transaction object attribute values 2. Establish the connection with database 3. Perform the desired database operation 4. Disconnect the connection to the database Among them, the transaction attributes of the object, a total of 15, the top 10 use to connect to the database, 5 is used to return the database after operating state (each interface used to connect the properties of the different attributes, such as ODBC, etc., see the page P74), after five attributes of the more important a SQLCode (0, 1, 100) SQLNRows (the last operation affects the number of rows) SQLDBCode (error code) provided by the database SQLErrText (error text) SQLReturnData (additional information) Create your own transaction object (multiple databases, general need not)
The Transaction my_trans (note position of variable declaration, determines the scope of the variable) (note: this is just a pointer)
My_trans=Create transaction
Destory my_transaction to release the memory (don't)