我正在尝试在 C# 程序中使用 DB2 .Net 数据提供程序,而不是依赖 ODBC.下面的连接字符串有效,但仅适用于一个库(比如我的库是 test1 和 test2).
I am trying to use the DB2 .Net Data Provider in a C# program rather than relying on ODBC. The connection string below works, but only for one library (say my libraries are test1 and test2).
Data Source=xxx.xxx.xxx.xxx;User Id=testuser;Password=testpassword;
Naming=SQL;Default Collection=test1;
如果我添加库列表=test1,test2;"(我已经尝试了几种变体)连接字符串,它不允许我访问其他库,只能访问 defaultcollection 中定义的库.我也尝试过不指定默认集合,但这会导致查询根本不起作用.我需要做什么才能运行可以在同一连接上访问这两个库的查询?
If I add "Library List=test1, test2;" (I have tried several variations of that) to the connection string, it does not allow me access additional libraries, only what is defined in defaultcollection. I have also tried not specifying default collection as well, but that causes the query to not work at all. What do I need to do to be able to run a query that can access both of these libraries on the same connection?
库列表仅在使用系统命名约定时有效.
The library list only works when using the system naming convention.
SQL_NAMING
指定表由以下形式的集合名称限定:
collection.table
其中collection 是集合的名称,table 是表名.默认限定符是运行执行 SQL 语句的进程的用户 ID,在未显式限定表名且未指定默认集合名称时使用.
SQL_NAMING
Specifies that tables are qualified by the collection name in the form:
collection.table
where collection is the name of the collection and table is the table name. The default qualifier is the user ID running the process that executes the SQL statement and is used when the table name is not explicitly qualified and the default collection name is not specified.
SYSTEM_NAMING
指定文件由库名限定,格式为:
库/文件
其中 library 是库和文件的名称是表名.默认搜索路径是如果表名(文件)未明确限定,则为非限定表名的库列表 (*LIBL)并且未指定默认集合名称(库).
SYSTEM_NAMING
Specifies that files are qualified by library name in the form:
library / file
where library is the name of the library and file
is the table name. The default search path is the
library list (*LIBL) for the unqualified table name, if the table name (file) is not explicitly qualified
and a default collection name (library) is not specified.
这篇关于库列表的 IBM .NET 数据提供程序连接字符串问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!