#21 Port from Access

open
nobody
None
5
2012-12-07
2003-08-31
Anonymous
No

This is a biggie. But it would be terrific to be able
to port a MS Access application to a Gambas app. Maybe
a good intermediary would be an xml document describing
the Access forms, reports, queries, macros, and
modules? The trickiest part would be translating VB
into GAMBAS Basic. But this would be the killer app --
the one thing OpenOffice.org doesn't do that MSOffice does.

Discussion

  • Ron O.

    Ron O. - 2003-09-13

    Logged In: YES
    user_id=865563

    I was on sourceforge and look in the ToDo list. (12 sep 2003)

    The entry about port M$Access looks nice to me but
    I already forsee big problems.
    All information is stored in a *.mdb file wich is a format
    of M$ designed and owns.

    Modules & Classes:
    Can be exported as text from Access.
    Need much changes because it is working on a namespace
    wich
    mostly not is seen. I think this is a leak of Gambas.
    Syntax structure should be convertible, that was my C++
    example could handle. My php version has more but is also
    not ready to do it.

    Queries:
    Can be save with cut and paste from the designer.
    The 'Save' menu command saves only the result of the
    query.

    Tables:
    Like the Queries.

    Forms:
    This is the biggest problem.
    They are stored as objects in hidden system tables and give
    no acces without password, secret from MS, so if you want
    that
    you must readout the .mdb file with a binairy file editor,
    make a analize of the content structure, translate the tokens
    to the object names and many more to get something as a
    form
    file. Also the controls have properties like 'OldValue',
    Field, Binding etc. in addition to the standard controls
    from windows.

    Reports:
    I do even not think about that.

    If the Access aplication also build tables and queries in runtime
    then it is working with a DAO object/namespace. In this case
    the
    current db object is total nonsence, unusable. Structure is:

    Databases,Database,Tables,Table,Fields,Field

    myFieldValue= DAO.Databases("MyDB").Tables("MyTbl").Fields
    ("MyField").Value

    For ADO there are also
    Connections,Connection,Commands,Command etc.

    Consider also that all objects are default byref instead byval.
    This makes it a hell of a job todo, special the forms if you
    want a copy of them.

    The only thing Gambas can support native is subform objects.
    I did a port from Access to VB of the workflow controller I
    made
    as job and there was it already difficult to emulate some of
    the
    events in the forms. Data binding of the controls like Access
    was more or less out of the box, QTcontrols or Gambas don't
    have that.
    I'm afraid to ask Benoit to add some events, even if the are
    supported by
    QTcontrols. For properties my exmaple for missing proprties
    can do help.

    Ron

     
  • Benoit Minisini

    Benoit Minisini - 2003-11-01

    Logged In: YES
    user_id=29457

    I can't automatically convert a VB app to Gambas, so... There are
    horrible behaviours in the native VB language that make this task
    impossible ! After having used VB for years, I can't decide if Microsoft
    did that on purpose, or stupidly...