PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Where is MDB2 odbc driver

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database
View previous topic :: View next topic  
Author Message
JormaH



Joined: 29 Sep 2007
Posts: 6
Location: Finland

PostPosted: Sat Sep 29, 2007 9:13 am    Post subject: Where is MDB2 odbc driver Reply with quote

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
View user's profile Send private message
mrsocks



Joined: 03 Feb 2007
Posts: 14

PostPosted: Sun Dec 09, 2007 11:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Sun Dec 09, 2007 11:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
mrsocks



Joined: 03 Feb 2007
Posts: 14

PostPosted: Mon Dec 10, 2007 1:26 am    Post subject: Reply with quote

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
View user's profile Send private message
JormaH



Joined: 29 Sep 2007
Posts: 6
Location: Finland

PostPosted: Mon Dec 10, 2007 6:36 am    Post subject: Problem continues Reply with quote

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 Wink
_________________
--- Jormah ---
Back to top
View user's profile Send private message
mrsocks



Joined: 03 Feb 2007
Posts: 14

PostPosted: Mon Dec 10, 2007 6:51 am    Post subject: Re: Problem continues Reply with quote

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
View user's profile Send private message
JormaH



Joined: 29 Sep 2007
Posts: 6
Location: Finland

PostPosted: Mon Dec 10, 2007 7:09 am    Post subject: PEAR and ODBC solution Reply with quote

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
View user's profile Send private message
JormaH



Joined: 29 Sep 2007
Posts: 6
Location: Finland

PostPosted: Mon Dec 10, 2007 8:13 am    Post subject: MDB2 and ODBTP Reply with quote

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 Wink
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
View user's profile Send private message
mrsocks



Joined: 03 Feb 2007
Posts: 14

PostPosted: Mon Dec 10, 2007 8:25 am    Post subject: Reply with quote

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
View user's profile Send private message
JormaH



Joined: 29 Sep 2007
Posts: 6
Location: Finland

PostPosted: Mon Dec 10, 2007 9:27 am    Post subject: Access ODBC syntax Reply with quote

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
View user's profile Send private message
mrsocks



Joined: 03 Feb 2007
Posts: 14

PostPosted: Tue Dec 11, 2007 6:48 am    Post subject: Reply with quote

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:Very HappyB for now, but will let you know for sure soon.
Back to top
View user's profile Send private message
JormaH



Joined: 29 Sep 2007
Posts: 6
Location: Finland

PostPosted: Tue Dec 11, 2007 7:17 pm    Post subject: Access and PEAR Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software