Recent

Author Topic: PDO  (Read 8154 times)

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
PDO
« on: June 12, 2008, 03:08:08 pm »
Hi.

Do anyone know where to find some documentation for PDO - it seems to be a closely guarded secret as it is not possible to log-in at the page John suggests?

Regards
Chris

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1930
RE: PDO
« Reply #1 on: June 12, 2008, 07:54:43 pm »

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
RE: PDO
« Reply #2 on: June 13, 2008, 01:01:54 pm »
Hi theo

Not quite, as what I am referring to is this:

The Wiki/Manual for PDO is located at https://trac.synsport.com:8000/index.php/pdo

When you get an http authentication box, just use guest/guest as the user name and password.

Actually it is not possible to log in.

My problem is, that I am seeking (which unfortunately is a problem not only related to PDO) a simple instruction to get started with PDO.

There is no package file for PDO, but a lot of units referring to one and each other, making it quite unclear how it has to be used (I am not thinking of usage of the SQL related units as such, as that is quite similar to Zeos, but simple getting it to work in Lazarus/FPC under Linux).

My reason for wanting to try PDO is (and correct me if I am wrong) that it is able to encapsulate the MySQL library file into the binary, thus removing the requirement for the libmysql.

If I could do the same with Zeos, or at least make a mechanism so there was no requirement for the user to install MySQL, like having the library in the same file as the binary, it could also be a solution.

Also it wonders me a little why ZEOS adds so much overhead (a stripped binary console application grows from app. 700K to more than 2M only due to Zeos) - all I need is the ZConnection and ZQuery, preparing all SQL by parsing.

Regards
Chris

jrmarino

  • New Member
  • *
  • Posts: 24
PDO
« Reply #3 on: June 13, 2008, 03:35:01 pm »
chrnobel, Theo is exactly correct.

The "Pascal Data Objects" are now located at http://pdo.sourceforge.net/ and have been for a couple of years.  The documentation is included on that site.

Whatever wiki you are looking at has not been updated.

jrmarino

  • New Member
  • *
  • Posts: 24
Re: RE: PDO
« Reply #4 on: June 13, 2008, 03:38:05 pm »
Quote from: "chrnobel"

My reason for wanting to try PDO is (and correct me if I am wrong) that it is able to encapsulate the MySQL library file into the binary, thus removing the requirement for the libmysql.

If I could do the same with Zeos, or at least make a mechanism so there was no requirement for the user to install MySQL, like having the library in the same file as the binary, it could also be a solution.


The user doesn't need to install mysql, but the libmysql.dll file must be included with the binary.  It's not incapsulated.

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
RE: Re: RE: PDO
« Reply #5 on: June 13, 2008, 04:47:48 pm »
Hi John

Quote
Whatever wiki you are looking at has not been updated.

Ok my bad, I just understud from the readme file that there were some tutorials there.

On sourceforge there are some good descriptions of the components, no problem, but what I miss is simply a crash course in getting started.

Quote
The user doesn't need to install mysql, but the libmysql.dll file must be included with the binary. It's not incapsulated.

Now it is actually Linux, so it's actually libmysql(something).so, but as far as I have tried it is not as simple as having the libmysql.so in the same directory as the binary - it have to be somewhere in the library path like /usr/lib

What I want to do is making it simple for the user, so he does not have to consider whether he has MySQL installed or not.

Regards
Chris

jrmarino

  • New Member
  • *
  • Posts: 24
PDO
« Reply #6 on: June 17, 2008, 03:18:36 pm »
In the downloads, there are some example programs that should provide some insight on getting started.  There's no fancy tutorial or anything that I know of.

if it's linux, they'll have to have the mysql client installed.  Perhaps a package can be defined with that as a dependency and it will install if needed.  That's about as easy as it will get for a linux program.  Of course, that means a platform specific solution (rpm, apt/synaptic, etc).

For windows you just drop the dll in the same directory.

jrmarino

  • New Member
  • *
  • Posts: 24
PDO
« Reply #7 on: June 17, 2008, 03:21:01 pm »
FYI - I've been meaning to add PostgreSQL support.  I was hoping to do it during Spring 2008 but I'm going to have to push it off a few more months, but its definitely on the "To Do" list.

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
PDO
« Reply #8 on: June 19, 2008, 11:52:05 am »
Thanks for your feedback.

Actually I discovered the other day, that ZEOS actually does include the library in the binary (which seems to have been implemented between two version without me noticing it), resulting in a totally self contained application.

Chris

 

TinyPortal © 2005-2018