锘??xml version="1.0" encoding="utf-8" standalone="yes"?>狠狠色噜噜狠狠色综合久,久久精品1区,欧美激情视频在线播放http://www.shnenglu.com/bigsml/category/2784.htmlzh-cnWed, 21 May 2008 09:26:35 GMTWed, 21 May 2008 09:26:35 GMT60鍦↙inux涓嬪疄鐜板Microsoft Access Database(.mdb)鏌ヨ璁塊棶http://www.shnenglu.com/bigsml/archive/2006/10/09/13482.html娉℃場鐗?/dc:creator>娉℃場鐗?/author>Mon, 09 Oct 2006 03:19:00 GMThttp://www.shnenglu.com/bigsml/archive/2006/10/09/13482.htmlhttp://www.shnenglu.com/bigsml/comments/13482.htmlhttp://www.shnenglu.com/bigsml/archive/2006/10/09/13482.html#Feedback0http://www.shnenglu.com/bigsml/comments/commentRss/13482.htmlhttp://www.shnenglu.com/bigsml/services/trackbacks/13482.html
You will need the following:
Linux ( I鈥檓 running RedHat 9.0)
PHP
Apache
UnixODBC
MDBTools

INSTRUCTIONS
1) Download the UnixODBC RPM, found here. I installed unixODBC version 2.2.5.1.
rpm -ivh unixODBC-2-2.5-1.i386.rpm

2) Download the MDBTools rpm, found here. I installed mdbtools version 0.5.1. Read limitations!
rpm -ivh mdvtools-0.5-1.i386.rpm

3) Download the MDBTools ODBC driver rpm. Again I installed version 0.5-1.i386.rpm. Read limitations!
rpm -ivh mdbtools-odbc-0.5-1.i386.rpm

4) Add the mdbtools driver to your unixODBC config.
Create a new text file. NON-LINUX user: Beware do not do this on windows as you might get werid new lines, use vi.

[MDBToolsODBC]
Description = MDB Tools ODBC drivers
Driver = /usr/lib/libmdbodbc.so.0
Setup =
FileUsage = 1
CPTimeout =
CPReuse =


NOTE: The driver may be in /usr/local/lib/libmdbodbc.so.0. This happens if you build from source and use the make install command. The RPM puts it in /usr/lib.
Now install the driver using the file you created. This is called a template file.
odbcinst -i -d -f template.file

5) Define the datasource name. This is done in the /etc/odbc.ini file. So pull up this file in vi or another text editor and add the following lines.

[Dogs]
Description = Microsoft Access Database of Dogs
Driver = MDBToolsODBC
Database = /var/data/my_dog_db.mdb
Servername = localhost
UserName =
Password =
port = 5432


That鈥檚 it you should now have an odbc connection available. I will demonstrate using php, this assumes that your php is compiled with UnixODBC support, the version that ships with Redhat 9 does if yours does not then you can learn how here.

So I will write a quick php script to query my dogs database and print out the names and weights of my dogs.

$myDB = odbc_connect(鈥滵ogs鈥?鈥?,鈥?);
$query = 鈥渟elect name, weight from dog_list鈥?
$result = odbc_exec($myDB, $query);
while (odbc_fetch_row($result)) {
print 鈥淣ame = 鈥?. odbc_result($result,鈥漬ame鈥?;
print 鈥?br />Weight = 鈥?. odbc_result($result,鈥漺eight鈥?;
}


If you get a php error that says odbc_connect is not a function then see if you have php-odbc installed. Do rpm -qa php-odbc. If you see php-odbc returned then you have it if not install it., the rpm is available on the redhat discs.

Limitations:
- As of the time of writing this entry MDBTools did not support write access to the mdb files. This was fine for my purposes as I was reading data in and sticking it into a mysql database.
- There is a bug in MDBTools v0.5 which does not allow you to query tables or columns with an underscore. This was a bug I hit early on, but it has been fixed in new version 0.6 but that has not been released as of the time of writing this article. So I recompiled the 0.5 source code with the fix from the 0.6 CVS repository. I have bundled it into a 0.5 release and have the two rpms mentioned above here:
mdbtools-0.5-1.i386.rpm
mdbtools-odbc-0.5-1.i386.rpm

I would check the official download site before using my hacked version as I鈥檓 sure this bug will be fixed in 0.6 (plus rumor has write access will be present as well).



]]>
99久久99久久精品免费看蜜桃| av午夜福利一片免费看久久| 久久99国产精品尤物| 久久久久国产一区二区| 久久精品亚洲欧美日韩久久| 久久精品国产91久久综合麻豆自制 | 久久精品无码一区二区日韩AV| 成人资源影音先锋久久资源网| 欧美大香线蕉线伊人久久| 亚洲国产欧美国产综合久久| 亚洲国产另类久久久精品小说| 久久精品人人做人人爽电影| 久久人人爽人人人人爽AV| 精品国产日韩久久亚洲| 亚洲国产精品无码久久98| 新狼窝色AV性久久久久久| 久久99精品久久只有精品 | 日韩乱码人妻无码中文字幕久久 | 91精品国产91久久久久久蜜臀| 久久最近最新中文字幕大全| 品成人欧美大片久久国产欧美| 久久国产精品一区| 狠狠色噜噜色狠狠狠综合久久| 精品久久人人爽天天玩人人妻| 日韩精品久久久久久免费| 9999国产精品欧美久久久久久| 99久久国产综合精品网成人影院 | 久久精品国产精品亚洲人人 | 久久久久久极精品久久久| 亚洲国产成人久久综合区| 久久这里只有精品18| 国产国产成人久久精品| 久久精品国产亚洲av麻豆图片| 女人香蕉久久**毛片精品| 精品久久久久久无码不卡| 97久久香蕉国产线看观看| 怡红院日本一道日本久久 | 久久精品国产影库免费看| 婷婷久久五月天| 亚洲国产欧美国产综合久久| 久久最近最新中文字幕大全|