Redian新闻
>
ORACLE Pro*C 远程接续一问?
avatar
ORACLE Pro*C 远程接续一问?# Database - 数据库
k*u
1
char username[10] = "scott";
char password[10] = "tiger";
char db_name[10] = "oracle1";
char db_string[20] = "NYNON";
/* connect to the non-default database using db_name */
EXEC SQL CONNECT :username IDENTIFIED BY :password
AT :db_name USING :db_string; ...
解释:
The host variable db_string contains the Net8 syntax for connecting
to a non-default database at a remote node.
俺还是不太懂db_string如何设了,db_string与Net8的那个设置文件的那些项目有关,
请各位高高手帮帮忙,谢谢!
avatar
j*y
2
It is used for the non-default database on the concurrent node.
I haven't used it. But I think you can configure it bu using
SQL*NET easy configuration tool (for Oracle 7.x) or Net8(for
oracle 8). It will add the entry in the tnsname.ora and
listen.ora. Then you configure it in the ODBC or JDBC. I
suppose that the db_string is the string you add in the ODBC/JDBC.

【在 k*u 的大作中提到】
: char username[10] = "scott";
: char password[10] = "tiger";
: char db_name[10] = "oracle1";
: char db_string[20] = "NYNON";
: /* connect to the non-default database using db_name */
: EXEC SQL CONNECT :username IDENTIFIED BY :password
: AT :db_name USING :db_string; ...
: 解释:
: The host variable db_string contains the Net8 syntax for connecting
: to a non-default database at a remote node.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。