亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: 操作數(shù)據(jù)庫問題 [打印本頁]

作者: famous    時間: 2007-06-11 16:01
標(biāo)題: 操作數(shù)據(jù)庫問題
請問在unix C 下有沒有一個通用的技術(shù)可以訪問/操作任意的數(shù)據(jù)庫
我的意思就是,現(xiàn)在C開發(fā)informix的程序用ec,開發(fā)oracle的用pc,開發(fā)db2的用db2test.sqc。。。等等其他數(shù)據(jù)庫。
雖然在C程序上代碼很類似,但是編譯上還是不太一樣。

有沒有一種通用的技術(shù),可以實(shí)現(xiàn)一套代碼,訪問/操作任意的數(shù)據(jù)庫??

我查了查odbc好像可以,但是那是需要另外安裝的。

各種數(shù)據(jù)庫是否有一種通用的標(biāo)準(zhǔn)接口???
作者: sunlan    時間: 2007-06-11 19:37
數(shù)據(jù)庫沒有通用接口。可行的辦法是針對不同的數(shù)據(jù)庫自己用esql/c封裝一套標(biāo)準(zhǔn)的庫出來
作者: jeffwang8001    時間: 2007-06-11 21:21
因?yàn)闆]有通用的接口,所以java中封裝了一個JDBC
作者: zwylinux    時間: 2007-06-11 23:44
odbc已經(jīng)算很合適的了
作者: famous    時間: 2007-06-12 10:03
多謝樓上的幾位。

我看了一下linux/unix odbc 并在自己的虛擬機(jī)上裝了一下,開始給我報 找不到 X includes ,發(fā)現(xiàn)需要xwindows的桌面環(huán)境。我的虛機(jī)當(dāng)初為了節(jié)省空間,沒有裝桌面環(huán)境。我也看了看解包出來的readme 和 install文件 都沒有發(fā)現(xiàn)不用Xwindows的安裝方法。
在install 文件中只說明了安裝需要
    o gnu make version 3.7 or newer (required)
    o C++ compiler and library (required):
        - egcs 1.x, or
    - g++ 2.8.x and libg++ 2.8.x (where x > 0), or
    - g++ 2.7.2.x and libg++ 2.7.2
這些software packages
所以我覺得應(yīng)該有辦法使用odbc脫離桌面系統(tǒng)。

有哪位曾經(jīng)用到過?期待您的賜教,謝謝~
作者: famous    時間: 2007-06-12 10:40
解決了,仔細(xì)又看了一遍INSTALL文件,有如下一段
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System).  The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
覺得可以實(shí)現(xiàn)。
./configure --help中
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR

因?yàn)椴恢纗 windows system的PACKAGE是什么?(還請高手指點(diǎn))用--without-x 和 --with-x=no 試過了,都不行。最后查到--disable-gui 屏蔽 gui的環(huán)境,就可以了。

./configure --prefix=/usr/local/unixODBC-2.2.1 --includedir=/usr/include --libdir=/usr/lib -bindir=/usr/bin --sysconfdir=/etc --disable-gui




歡迎光臨 Chinaunix (http://www.72891.cn/) Powered by Discuz! X3.2