在ODBC连接字符串中指定和使用多个库 [英] Specify and use multiple libraries in ODBC connection string

查看:230
本文介绍了在ODBC连接字符串中指定和使用多个库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的用于连接到DB2i的odbc连接字符串如下所示:

My odbc connection string for connecting to DB2i looks like this:

Driver = {Client Access ODBC Driver )};系统= XX.XX.XX.XX; DBQ = LIB1 LIB2 LIB3 LIB4 LIB5 LIB6 LIB7 LIB8; languageid = ENU; qrystglmt = -1; CMT = 0;登记表= 1

Driver={Client Access ODBC Driver (32-bit)};system=xx.xx.xx.xx;dbq=LIB1 LIB2 LIB3 LIB4 LIB5 LIB6 LIB7 LIB8;languageid=ENU;qrystglmt=-1;cmt=0;signon=1

上述连接字符串指定要使用的多个库/模式。但是当我尝试访问一个文件/表从一个库而不是第一个(如从LIB2 ... LIB8)我得到一个异常说FILE xx在LIB1中找不到

The above connection string specifies multiple libraries/schemas for use. But when I try to access a file/table from a library other than the first one (like from LIB2...LIB8) I get a exception saying "FILE xx not found in LIB1"

为什么不自动搜索其他指定库中的文件/表,它只搜索第一个库中的文件?

我需要这种情况的解决方法。

I need a workaround for this situation.

推荐答案

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC4QFjAA&url=http%3A %2F%2Fwww.ibm.com%2Fdeveloperworks%2Fibmi%2Flibrary%2FI-sqlnaming%2F&安培; EI = eJKqUsC4NYqhkQez6YHoBQ&安培; USG = AFQjCNHaxo1l8AzyY9QxFVfi8_ZwcUhUAA&安培; SIG2 = 8SpbJD-187KRqnngquxvdw和放大器; BVM = bv.57967247,d.eW0相对=nofollow >系统命名模式,将 naming = 1 添加到您的连接字符串

Use "system naming" mode, by adding naming=1 to your connection string.

在库列表中,放置一个逗号前第一库。

In your library list, place a comma before the first library.

Driver={Client Access ODBC Driver (32-bit)};system=systemname;naming=1;
dbq=,LIB1,LIB2,LIB3,LIB4,LIB5,LIB6,LIB7,LIB8;languageid=ENU;cmt=0;signon=1

这篇关于在ODBC连接字符串中指定和使用多个库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆