| View previous topic :: View next topic |
| Author |
Message |
JormaH
Joined: 29 Sep 2007 Posts: 6 Location: Finland
|
Posted: Sat Sep 29, 2007 9:13 am Post subject: Where is MDB2 odbc driver |
|
|
I have used PEAR DB to connect MS Access database. But now it says:
"This package has been superseded, but is still maintained for bugs and security fixes. Use MDB2 instead."
But there is no MDB2_Driver for ODBC connection.
Does anyone knows is there soon comming some driver, like DB package? _________________ --- Jormah --- |
|
| Back to top |
|
 |
mrsocks
Joined: 03 Feb 2007 Posts: 14
|
Posted: Sun Dec 09, 2007 11:02 pm Post subject: |
|
|
JormaH
Did you ever find an ODBC driver for MDB2?
I NEED one and have been looking around.
What did you end up doing to?
Thanks. |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sun Dec 09, 2007 11:11 pm Post subject: |
|
|
| mrsocks, if you need the driver so much, why don't you write it yourself and contribute it back to the community? |
|
| Back to top |
|
 |
mrsocks
Joined: 03 Feb 2007 Posts: 14
|
Posted: Mon Dec 10, 2007 1:26 am Post subject: |
|
|
| mark wrote: | | mrsocks, if you need the driver so much, why don't you write it yourself and contribute it back to the community? |
Hey, what a great idea.
Maybe when I am not so overwhelmed by actual paying work, I will have the time to do so.
I used MDB2 in order to allow the application that is being developed to move to different dbs and setups. If I could have seen into the future and know this application would be moved to an environment that wasnt supported, I would have used DB.
So instead of writing insightful and helpful posts such as this, be a superstar and run along and make one. This way you can really contribute.
But hey, if nothing else, maybe these posts will keep this at the top to see if anyone else has an immediate solution. |
|
| Back to top |
|
 |
JormaH
Joined: 29 Sep 2007 Posts: 6 Location: Finland
|
Posted: Mon Dec 10, 2007 6:36 am Post subject: Problem continues |
|
|
No, same problem continues.
And some other PHP forums I find almost same "answer":
You can add this function, just write it for yourself and for all users.
It will be cool.
I now looking third party solution and testing package like:
http://phpbuilder.blogspot.com/
This is for datagrid solution, but it use PEAR:DB as well.
| Code: |
(example of ODBC connection string)
$result_conn = $db_conn->connect(DB::parseDSN('odbc://root:12345@test_db'));
$db_conn = DB::factory('mysql'); /* don't forget to change on appropriate db type */
|
Working fine with MySQL but who knows,, lets see this evening. It's early morning monday in Finland  _________________ --- Jormah --- |
|
| Back to top |
|
 |
mrsocks
Joined: 03 Feb 2007 Posts: 14
|
Posted: Mon Dec 10, 2007 6:51 am Post subject: Re: Problem continues |
|
|
| JormaH wrote: | No, same problem continues.
And some other PHP forums I find almost same "answer":
You can add this function, just write it for yourself and for all users.
It will be cool.
I now looking third party solution and testing package like:
http://phpbuilder.blogspot.com/
This is for datagrid solution, but it use PEAR:DB as well.
|
Thanks for the reply and the suggestion.
I have used DB allot before so if i must switch packages, I would move to that.
I have a few emails out to some people with some questions. I will keep you updated if I hear anything.
Worst case: I am going write a class that uses odbc connections and the functions that I am using in MDB2, so I wont need to rewrite my code. I dont need many, so this may be my best solution in the short term.
I can send it to you if you want, if that;s what I end up doing. |
|
| Back to top |
|
 |
JormaH
Joined: 29 Sep 2007 Posts: 6 Location: Finland
|
Posted: Mon Dec 10, 2007 7:09 am Post subject: PEAR and ODBC solution |
|
|
Ok, it would be nice.
I continue my testing with PHP Builder datagrid.
I have little holiday cottage booking software my to do list. My main problem is that their ISP supports only IIS/Access and therefore I must rewrite a lot of DB code if I can't find other solution.
I try Solunas Booking Engine, but new version is build with Ruby/Rails and old PHP Api supports only mysql functions, so mission impossible?
I look aroud about PHP Builder, I test it today with Access ODBC and keep you up to date. _________________ --- Jormah --- |
|
| Back to top |
|
 |
JormaH
Joined: 29 Sep 2007 Posts: 6 Location: Finland
|
Posted: Mon Dec 10, 2007 8:13 am Post subject: MDB2 and ODBTP |
|
|
Hi,
I found two interesting things
1) MDB2-2.4.1.tgz
-- I upload this to my web-server /files directory. You can download it there. Site lang is finnish, but filenames are universal
http://datatuki.sicom.fi/files --> PEAR-DB
2) DB_odbtp - this is included PHP Builder PEAR class - they says:
http://odbtp.sourceforge.net/
DB_odbtp is a PEAR DB driver that connects to a database using ODBTP (Open Database Transport Protocol). ODBTP allows any platform to remotely access the ODBC facilities on a Win32 host to connect to a database. A PHP application on a Linux, UNIX or Novell platform will be able to access a Microsoft SQL Server, Microsoft Access, Visual FoxPro, or any other database residing on a Win32 platform.
PHP developers on Windows can use the odbtp driver instead of the odbc, ado and mssql drivers. The odbtp extension provides better performance and more capabities than the extensions used by the other drivers. For example, Microsoft Access and Microsoft SQL Server can store UNICODE text data. However, the odbtp driver is the only one that provides full support for UNICODE text data and queries. The odbtp driver also has the exact behaviour on both Win32 and non-Win32 installations.
I hope this help you for MDB2 development. I'll wait for comments. _________________ --- Jormah --- |
|
| Back to top |
|
 |
mrsocks
Joined: 03 Feb 2007 Posts: 14
|
Posted: Mon Dec 10, 2007 8:25 am Post subject: |
|
|
Yeah, I had both of them open today looking at what it would take to get this working, but not sure if timing will allow me to get this driver working reliably.
Thanks for the info and I will let you know what I hear (if anything), or tell you what my result is (my own class to mimic the methods or change all the sql to php odbc_connect functions) |
|
| Back to top |
|
 |
JormaH
Joined: 29 Sep 2007 Posts: 6 Location: Finland
|
Posted: Mon Dec 10, 2007 9:27 am Post subject: Access ODBC syntax |
|
|
Hi, one tiny question:
What kind of syntax you use to connect MS-Access with ODBC??
I can't get it working, I try:
| Code: | $db_conn = DB::factory('odbc');
$result_conn = $db_conn->connect(DB::parseDSN('odbc://username:password@db_name'));
|
-- or -- | Code: | | connect(DB::parseDSN('odbc:'.$DB_USER.':'.$DB_PASS.'@'.$DB_HOST.'/'.$DB_NAME)); |
| Code: | | if(DB::isError($result_conn)){ die($result_conn->getDebugInfo()); } |
Error test was pass but no data retrieved. _________________ --- Jormah --- |
|
| Back to top |
|
 |
mrsocks
Joined: 03 Feb 2007 Posts: 14
|
Posted: Tue Dec 11, 2007 6:48 am Post subject: |
|
|
I am not really sure. I havent used Access as a DB in years.
Sorry.
... as an update...
It looks like I wil be switching to Pear: B for now, but will let you know for sure soon. |
|
| Back to top |
|
 |
JormaH
Joined: 29 Sep 2007 Posts: 6 Location: Finland
|
Posted: Tue Dec 11, 2007 7:17 pm Post subject: Access and PEAR |
|
|
Ok.
That's the wild question.
I'm now really satisfied to mysql connection + PHP Builer Grid
It's totally cool!
But I'm still looking for MS-Access connection for reason that my customers ISP settings.
Waiting for.... some testing.
---- _________________ --- Jormah --- |
|
| Back to top |
|
 |
|