p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Accessing Access with PHP?


Message #1 by "John Arbon" <subscriptions@c...> on Thu, 16 May 2002 15:13:21
This is the first resource I have turned to, so far, (I'll be looking at 
more places after posting this) but I need to know if it's possible to 
utilize MS Access with PHP.

Thanks!

John
Message #2 by salamander <andrew@s...> on Thu, 16 May 2002 10:18:05 -0400
John

Sure, just use ODBC.  A system DSN from a Windows box (where your MS 
Access db is) needs to be created.
If your PHP is on the same box, then you are done, and if it's on a *Nix 
box then you can compile PHP --with-iodbc as per the HOWTO at 
www.iodbc.org and then install OpenLink's Multi-Tier ODBC Agent and 
configure per the examples in the docs.

If you run into problems, let me know.

Best regards,
Andrew Hill

On Thursday, May 16, 2002, at 03:13 PM, John Arbon wrote:

> This is the first resource I have turned to, so far, (I'll be looking at
> more places after posting this) but I need to know if it's possible to
> utilize MS Access with PHP.
>
> Thanks!
>
> John
> to unsubscribe send a blank email to leave-
> beginning_php-792500J@p...
>

Message #3 by "John Arbon" <subscriptions@c...> on Thu, 16 May 2002 15:35:27
Andrew,

Thank you for such a timely response!

Being fairly new to PHP I do not know what OBDC stands for or how I use 
it.  I'll be searching the books, but any explaination I can get here will 
help a lot!

Do I use all the "mysql" function as I would with a mySQL db?

John


> John

Sure, just use ODBC.  A system DSN from a Windows box (where your MS 
Access db is) needs to be created.
If your PHP is on the same box, then you are done, and if it's on a *Nix 
box then you can compile PHP --with-iodbc as per the HOWTO at 
www.iodbc.org and then install OpenLink's Multi-Tier ODBC Agent and 
configure per the examples in the docs.

If you run into problems, let me know.

Best regards,
Andrew Hill
Message #4 by salamander <andrew@s...> on Thu, 16 May 2002 10:46:24 -0400
Hi John,

ODBC stands for "Open DataBase Connectivity" and is an API that allows 
database-agnostic access instead of via a specific database driver.  
This means that you can swap out different databases to get functions 
you need.  e.g. code your application against MySQL, and then swap in 
Virtuoso if you need SQL-to-XML features or Foreign Keys.

You use the ODBC PHP functions - check http://www.php.net/odbc

Good luck, and let me know what you think.
I also wrote the ODBC chapter in the just published Professional PHP 4 
Programming (Wrox), so if you have questions as you get into it let me 
know.

Cheers,
Andrew

On Thursday, May 16, 2002, at 03:35 PM, John Arbon wrote:

> Andrew,
>
> Thank you for such a timely response!
>
> Being fairly new to PHP I do not know what OBDC stands for or how I use
> it.  I'll be searching the books, but any explaination I can get here 
> will
> help a lot!
>
> Do I use all the "mysql" function as I would with a mySQL db?
>
> John
>
>
>> John
>
> Sure, just use ODBC.  A system DSN from a Windows box (where your MS
> Access db is) needs to be created.
> If your PHP is on the same box, then you are done, and if it's on a *Nix
> box then you can compile PHP --with-iodbc as per the HOWTO at
> www.iodbc.org and then install OpenLink's Multi-Tier ODBC Agent and
> configure per the examples in the docs.
>
> If you run into problems, let me know.
>
> Best regards,
> Andrew Hill
> to unsubscribe send a blank email to leave-
> beginning_php-792500J@p...
>

Message #5 by "John Arbon" <subscriptions@c...> on Thu, 16 May 2002 16:04:09
Hehehehe!

Andrew,

Professional PHP4 is one of the books I am using for reference.  So you 
KNOW I'll get back to you if I have any more questions for you about this 
topic! 8)

John




> Hi John,

ODBC stands for "Open DataBase Connectivity" and is an API that allows 
database-agnostic access instead of via a specific database driver.  
This means that you can swap out different databases to get functions 
you need.  e.g. code your application against MySQL, and then swap in 
Virtuoso if you need SQL-to-XML features or Foreign Keys.

You use the ODBC PHP functions - check http://www.php.net/odbc

Good luck, and let me know what you think.
I also wrote the ODBC chapter in the just published Professional PHP 4 
Programming (Wrox), so if you have questions as you get into it let me 
know.

Cheers,
Andrew
Message #6 by "John Arbon" <subscriptions@c...> on Thu, 16 May 2002 20:16:57
Alright, in the brief time I had to read, I gleened that I need to setup 
the database and then configure ODBC to direct requests to it through the 
DSN using the obdc() functions as I would the mysql() functions.

Since I won't be doing this locally, I'm assuming that the Windows Host 
can direct me in doing that, or do it for me?

And the connectivity pretty much takes care of itself after that?

John
Message #7 by salamander <andrew@s...> on Thu, 16 May 2002 15:23:42 -0400
John,

Not sure I completely understand your architecture.
If this is simply an ISP providing PHP/ MS Access hosting on Windows, 
they they should be able to provide you an ODBC DSN name, login and 
password, as the Access ODBC Driver is part of Windows, so they can 
setup a DSN for you.

But why are you trying to use MS Access anyways, if you don't need to? :)
I'd recommend almost any other database over Access for web applications.

Best regards,
Andrew

On Thursday, May 16, 2002, at 08:16 PM, John Arbon wrote:

> Alright, in the brief time I had to read, I gleened that I need to setup
> the database and then configure ODBC to direct requests to it through 
> the
> DSN using the obdc() functions as I would the mysql() functions.
>
> Since I won't be doing this locally, I'm assuming that the Windows Host
> can direct me in doing that, or do it for me?
>
> And the connectivity pretty much takes care of itself after that?
>
> John
> to unsubscribe send a blank email to leave-
> beginning_php-792500J@p...
>

Message #8 by "John Arbon" <subscriptions@c...> on Thu, 16 May 2002 21:13:02
I have to laugh!  I know EXACTLY what you are talking about!

This is a client who has their site already hosted on a Windows box.
So, because I have seen the light and use only *nix hosts I've had to 
research the use of Access.  I have tried to convince them to move to 
another host for less money, but they are reluctant.

Anyway, after learning this, I will stuff it away, where hopefully I will 
never have to use it again.

John



> John,

Not sure I completely understand your architecture.
If this is simply an ISP providing PHP/ MS Access hosting on Windows, 
they they should be able to provide you an ODBC DSN name, login and 
password, as the Access ODBC Driver is part of Windows, so they can 
setup a DSN for you.

But why are you trying to use MS Access anyways, if you don't need to? :)
I'd recommend almost any other database over Access for web applications.

Best regards,
Andrew
Message #9 by "Deepak Kumar Vasudevan" <deepak@c...> on Fri, 17 May 2002 11:25:14 +0530
Hi,

Just use ADODB for PHP which will be able to make even DSNLess connections
too.

deepak
----- Original Message -----
From: "beginning php digest" <beginning_php@p...>
To: "beginning_php digest recipients" <beginning_php@p...>
Sent: Friday, May 17, 2002 4:31 AM
Subject: beginning_php digest: May 16, 2002


> -----------------------------------------------
> When replying to the digest, please quote only
> relevant material, and edit the subject line to
> reflect the message you are replying to.
> -----------------------------------------------
>
> The URL for this list is:
> http://p2p.wrox.com/list.asp?list=beginning_php
> BEGINNING_PHP Digest for Thursday, May 16, 2002.
>
> 1. Accessing Access with PHP?
> 2. Re: Accessing Access with PHP?
> 3. Re: Accessing Access with PHP?
> 4. Re: Accessing Access with PHP?
> 5. Re: Accessing Access with PHP?
> 6. Re: Accessing Access with PHP?
> 7. Re: Accessing Access with PHP?
> 8. Re: Accessing Access with PHP?
>
> ----------------------------------------------------------------------
>
> Subject: Accessing Access with PHP?
> From: "John Arbon" <subscriptions@c...>
> Date: Thu, 16 May 2002 15:13:21
> X-Message-Number: 1
>
> This is the first resource I have turned to, so far, (I'll be looking at
> more places after posting this) but I need to know if it's possible to
> utilize MS Access with PHP.
>
> Thanks!
>
> John
> ----------------------------------------------------------------------
>
> Subject: Re: Accessing Access with PHP?
> From: salamander <andrew@s...>
> Date: Thu, 16 May 2002 10:18:05 -0400
> X-Message-Number: 2
>
> John
>
> Sure, just use ODBC.  A system DSN from a Windows box (where your MS
> Access db is) needs to be created.
> If your PHP is on the same box, then you are done, and if it's on a *Nix
> box then you can compile PHP --with-iodbc as per the HOWTO at
> www.iodbc.org and then install OpenLink's Multi-Tier ODBC Agent and
> configure per the examples in the docs.
>
> If you run into problems, let me know.
>
> Best regards,
> Andrew Hill
>
> On Thursday, May 16, 2002, at 03:13 PM, John Arbon wrote:
>
> > This is the first resource I have turned to, so far, (I'll be looking at
> > more places after posting this) but I need to know if it's possible to
> > utilize MS Access with PHP.
> >
> > Thanks!
> >
> > John
> > to unsubscribe send a blank email to leave-
> > beginning_php-792500J@p...
> >
>
>
> ----------------------------------------------------------------------
>
> Subject: Re: Accessing Access with PHP?
> From: "John Arbon" <subscriptions@c...>
> Date: Thu, 16 May 2002 15:35:27
> X-Message-Number: 3
>
> Andrew,
>
> Thank you for such a timely response!
>
> Being fairly new to PHP I do not know what OBDC stands for or how I use
> it.  I'll be searching the books, but any explaination I can get here will
> help a lot!
>
> Do I use all the "mysql" function as I would with a mySQL db?
>
> John
>
>
> > John
>
> Sure, just use ODBC.  A system DSN from a Windows box (where your MS
> Access db is) needs to be created.
> If your PHP is on the same box, then you are done, and if it's on a *Nix
> box then you can compile PHP --with-iodbc as per the HOWTO at
> www.iodbc.org and then install OpenLink's Multi-Tier ODBC Agent and
> configure per the examples in the docs.
>
> If you run into problems, let me know.
>
> Best regards,
> Andrew Hill
> ----------------------------------------------------------------------
>
> Subject: Re: Accessing Access with PHP?
> From: salamander <andrew@s...>
> Date: Thu, 16 May 2002 10:46:24 -0400
> X-Message-Number: 4
>
> Hi John,
>
> ODBC stands for "Open DataBase Connectivity" and is an API that allows
> database-agnostic access instead of via a specific database driver.
> This means that you can swap out different databases to get functions
> you need.  e.g. code your application against MySQL, and then swap in
> Virtuoso if you need SQL-to-XML features or Foreign Keys.
>
> You use the ODBC PHP functions - check http://www.php.net/odbc
>
> Good luck, and let me know what you think.
> I also wrote the ODBC chapter in the just published Professional PHP 4
> Programming (Wrox), so if you have questions as you get into it let me
> know.
>
> Cheers,
> Andrew
>
> On Thursday, May 16, 2002, at 03:35 PM, John Arbon wrote:
>
> > Andrew,
> >
> > Thank you for such a timely response!
> >
> > Being fairly new to PHP I do not know what OBDC stands for or how I use
> > it.  I'll be searching the books, but any explaination I can get here
> > will
> > help a lot!
> >
> > Do I use all the "mysql" function as I would with a mySQL db?
> >
> > John
> >
> >
> >> John
> >
> > Sure, just use ODBC.  A system DSN from a Windows box (where your MS
> > Access db is) needs to be created.
> > If your PHP is on the same box, then you are done, and if it's on a *Nix
> > box then you can compile PHP --with-iodbc as per the HOWTO at
> > www.iodbc.org and then install OpenLink's Multi-Tier ODBC Agent and
> > configure per the examples in the docs.
> >
> > If you run into problems, let me know.
> >
> > Best regards,
> > Andrew Hill
> > to unsubscribe send a blank email to leave-
> > beginning_php-792500J@p...
> >
>
>
> ----------------------------------------------------------------------
>
> Subject: Re: Accessing Access with PHP?
> From: "John Arbon" <subscriptions@c...>
> Date: Thu, 16 May 2002 16:04:09
> X-Message-Number: 5
>
> Hehehehe!
>
> Andrew,
>
> Professional PHP4 is one of the books I am using for reference.  So you
> KNOW I'll get back to you if I have any more questions for you about this
> topic! 8)
>
> John
>
>
>
>
> > Hi John,
>
> ODBC stands for "Open DataBase Connectivity" and is an API that allows
> database-agnostic access instead of via a specific database driver.
> This means that you can swap out different databases to get functions
> you need.  e.g. code your application against MySQL, and then swap in
> Virtuoso if you need SQL-to-XML features or Foreign Keys.
>
> You use the ODBC PHP functions - check http://www.php.net/odbc
>
> Good luck, and let me know what you think.
> I also wrote the ODBC chapter in the just published Professional PHP 4
> Programming (Wrox), so if you have questions as you get into it let me
> know.
>
> Cheers,
> Andrew
> ----------------------------------------------------------------------
>
> Subject: Re: Accessing Access with PHP?
> From: "John Arbon" <subscriptions@c...>
> Date: Thu, 16 May 2002 20:16:57
> X-Message-Number: 6
>
> Alright, in the brief time I had to read, I gleened that I need to setup
> the database and then configure ODBC to direct requests to it through the
> DSN using the obdc() functions as I would the mysql() functions.
>
> Since I won't be doing this locally, I'm assuming that the Windows Host
> can direct me in doing that, or do it for me?
>
> And the connectivity pretty much takes care of itself after that?
>
> John
> ----------------------------------------------------------------------
>
> Subject: Re: Accessing Access with PHP?
> From: salamander <andrew@s...>
> Date: Thu, 16 May 2002 15:23:42 -0400
> X-Message-Number: 7
>
> John,
>
> Not sure I completely understand your architecture.
> If this is simply an ISP providing PHP/ MS Access hosting on Windows,
> they they should be able to provide you an ODBC DSN name, login and
> password, as the Access ODBC Driver is part of Windows, so they can
> setup a DSN for you.
>
> But why are you trying to use MS Access anyways, if you don't need to? :)
> I'd recommend almost any other database over Access for web applications.
>
> Best regards,
> Andrew
>
> On Thursday, May 16, 2002, at 08:16 PM, John Arbon wrote:
>
> > Alright, in the brief time I had to read, I gleened that I need to setup
> > the database and then configure ODBC to direct requests to it through
> > the
> > DSN using the obdc() functions as I would the mysql() functions.
> >
> > Since I won't be doing this locally, I'm assuming that the Windows Host
> > can direct me in doing that, or do it for me?
> >
> > And the connectivity pretty much takes care of itself after that?
> >
> > John
> > to unsubscribe send a blank email to leave-
> > beginning_php-792500J@p...
> >
>
>
> ----------------------------------------------------------------------
>
> Subject: Re: Accessing Access with PHP?
> From: "John Arbon" <subscriptions@c...>
> Date: Thu, 16 May 2002 21:13:02
> X-Message-Number: 8
>
> I have to laugh!  I know EXACTLY what you are talking about!
>
> This is a client who has their site already hosted on a Windows box.
> So, because I have seen the light and use only *nix hosts I've had to
> research the use of Access.  I have tried to convince them to move to
> another host for less money, but they are reluctant.
>
> Anyway, after learning this, I will stuff it away, where hopefully I will
> never have to use it again.
>
> John
>
>
>
> > John,
>
> Not sure I completely understand your architecture.
> If this is simply an ISP providing PHP/ MS Access hosting on Windows,
> they they should be able to provide you an ODBC DSN name, login and
> password, as the Access ODBC Driver is part of Windows, so they can
> setup a DSN for you.
>
> But why are you trying to use MS Access anyways, if you don't need to? :)
> I'd recommend almost any other database over Access for web applications.
>
> Best regards,
> Andrew
>
>
> ---
>
> END OF DIGEST
>


Message #10 by "Juliet May" <jmay@s...> on Fri, 17 May 2002 01:26:21 -0600
Andrew,

Just out of curiosity --- Are you on the cover? If so, which one are you?

Question for anybody and everybody:

What is the best way to get an estimate for how long a project should take
(for someone who is reasonably proficient at developing) and what it would
cost in the open market. I'm just finishing up a project and I need to
benchmark what I have done against what others could have done and what it
would have cost if he had to hire someone with more experience than me.

I'm hoping if I give him this information my boss will cut me some slack and
plan deadlines better for the future. If on the other hand I find out I took
forever to do a simple project I will keep the information to myself. :)

Thanks,

Julie

Message #11 by salamander <andrew@s...> on Fri, 17 May 2002 09:23:46 -0400
Julie,

Nope, no cover pic for me on that book - I only wrote one chapter.
You'll see my pic on another Wrox book in the not too distant future.

Re your costing question - this is a huge issue :)
Figure out how many hours you spent developing, and then multiply by 
$20-$100 per hour depending on the complexity of the project, etc.

If you want to post a spec of that project here I'm sure folks will 
chime in with how long they thing you _should_ have taken. :)
This of course assumes that you have a final spec before starting 
development and control for feature creep... two things that aren't 
always possible when working with clients.

Best regards,
Andrew

On Friday, May 17, 2002, at 03:26 AM, Juliet May wrote:

> Andrew,
>
> Just out of curiosity --- Are you on the cover? If so, which one are 
> you?
>
> Question for anybody and everybody:
>
> What is the best way to get an estimate for how long a project should 
> take
> (for someone who is reasonably proficient at developing) and what it 
> would
> cost in the open market. I'm just finishing up a project and I need to
> benchmark what I have done against what others could have done and what 
> it
> would have cost if he had to hire someone with more experience than me.
>
> I'm hoping if I give him this information my boss will cut me some 
> slack and
> plan deadlines better for the future. If on the other hand I find out I 
> took
> forever to do a simple project I will keep the information to myself. :)
>
> Thanks,
>
> Julie
>
>
> to unsubscribe send a blank email to leave-
> beginning_php-792500J@p...
>


  Return to Index