Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Posts
    18

    Question Unanswered: php and ms access vba query

    hello i have no experience with php but am working somebody who wants to put together a web page using php and communicate with my database. within my database there are tables which contain rates and a subroutine which reads tables and then calculates a total. I have found topics saying that we can execute sql statments but what we would like to do is to :

    update ms access table with data from webpage
    execute ms access vba function within the database
    update results table in access with calculations returned by vba function
    retreive results from database results table and display on webpage.

    can anybody here offer some advice if the above can bedone?

    thanks for your help and time!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Yes, 1 & 4 for definite, 2 & 3 may have to be re-written in php (although I suggest ASP would be miles easier when using access!) but I'm almost certain they can be achieved. However - I must warn you that Access is a horrible database to be using for web development... Unless you're expecting < 10 concurrent users anyway!
    George
    Home | Blog

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    1 and 4 are attainable easily enough
    2 & 3 are not.

    in my view you have 3 options
    either
    1) rewrite / duplicate the functions in PHP (not particularly difficult)
    OR
    2) consider switching your scripting language to say ASP which may allow you to port the VBA function to ASP/ASP.NET
    OR
    3) consider switching your database form JET to say MS SQL or MySQL, to a server based db that supports stored procedures natively and call the function from your web script and Access forms

    of the 3 options Id suggest the latter is a 'smarter' solution.... it means you only have to write and maintain one set of functions

    Native Access databases (JET) do not support user written functions, any user written functions are are called by the presentation layer not the database layer
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by healdem
    Native Access databases (JET) do not support user written functions, any user written functions are are called by the presentation layer not the database layer
    I never considered that! I didn't think you could call functions form Access any other way - which is why I suggested the port to ASP (with VBScript of course!).
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •