How to import VB source text files into Access?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marco Stolpe

    How to import VB source text files into Access?

    Hi,

    I'm working on a medium size Access database together with another
    developer. We're using Visual Basic to provide some extended
    functionality to our users. After I read some books about managing
    several issues regarding implementation (coding standards, version
    control, self-written code checkers, etc.), I'm wondering how to apply
    such knowledge and techniques to our own project.

    What I would like to do is to manage my VBA source code with CVS on a
    Unix machine in the form of simple text files. I'd like to edit them
    with an arbitrary text editor (probably Emacs). This would allow me -
    for example - to write code-checkers, code-generators (maybe
    generating functionality from a specification in XML), documentation
    generators and so on in any scripting language I like (probably Perl).
    In other words, I'd like to flee the built in Access IDE.

    The only remaining question is how to get text source files imported
    into Access - if possible without any user interaction (that is: from
    a script or C/C++ command line application, whatever).

    Does anyone know how to do this?

    Thanks in advance for any replies,

    Marco
  • Michael \(michka\) Kaplan [MS]

    #2
    Re: How to import VB source text files into Access?

    Only Access understands its internal VBA project storage/stream format.
    While you can get the code out as text and then later get it back in, you
    can only do so from within Access.

    Although one has to ask why the use of Access is such awful if you have two
    Access developers who want to both contribute to a project. Especially since
    you could only compile/test the code within Access!


    --
    MichKa [MS]
    NLS Collation/Locale/Keyboard Development
    Globalization Infrastructure and Font Technologies

    This posting is provided "AS IS" with
    no warranties, and confers no rights.



    "Marco Stolpe" <x25ugip1@freen et.de> wrote in message
    news:65d35fc1.0 402020743.5edcd fd6@posting.goo gle.com...[color=blue]
    > Hi,
    >
    > I'm working on a medium size Access database together with another
    > developer. We're using Visual Basic to provide some extended
    > functionality to our users. After I read some books about managing
    > several issues regarding implementation (coding standards, version
    > control, self-written code checkers, etc.), I'm wondering how to apply
    > such knowledge and techniques to our own project.
    >
    > What I would like to do is to manage my VBA source code with CVS on a
    > Unix machine in the form of simple text files. I'd like to edit them
    > with an arbitrary text editor (probably Emacs). This would allow me -
    > for example - to write code-checkers, code-generators (maybe
    > generating functionality from a specification in XML), documentation
    > generators and so on in any scripting language I like (probably Perl).
    > In other words, I'd like to flee the built in Access IDE.
    >
    > The only remaining question is how to get text source files imported
    > into Access - if possible without any user interaction (that is: from
    > a script or C/C++ command line application, whatever).
    >
    > Does anyone know how to do this?
    >
    > Thanks in advance for any replies,
    >
    > Marco[/color]


    Comment

    • Tony Toews

      #3
      Re: How to import VB source text files into Access?

      Chuck Grimsby <c.grimsby@worl dnet.att.net.in valid> wrote:
      [color=blue]
      >
      >Use the SaveAsText and LoadFromText functions. Both are part of the
      >Access Application model.[/color]

      There's some sample code at Arvin Meyer's site.


      Tony
      --
      Tony Toews, Microsoft Access MVP
      Please respond only in the newsgroups so that others can
      read the entire thread of messages.
      Microsoft Access Links, Hints, Tips & Accounting Systems at

      Comment

      • TC

        #4
        Re: How to import VB source text files into Access?

        Use the undocumented SaveAsText & LoadFromText methods to save/load
        various objects as/from text files. (But those methods ARE NOT
        officially documented, so I guess that they could disappear at any
        time.) Run them via automation from any automation-capable client; eg.
        another (central) Access database.

        So, you could start the central database, select a different database
        & object from suitable dropdown lists, hit a "book in" button, & the
        code would retrieve the relevant text file from your Unix server, then
        programatically open the relevant database & run the LoadFromText (all
        from automation).

        I haven't done that myself, but I don't see why it shouldn't work.

        HTH,
        TC


        x25ugip1@freene t.de (Marco Stolpe) wrote in message news:<65d35fc1. 0402020743.5edc dfd6@posting.go ogle.com>...[color=blue]
        > Hi,
        >
        > I'm working on a medium size Access database together with another
        > developer. We're using Visual Basic to provide some extended
        > functionality to our users. After I read some books about managing
        > several issues regarding implementation (coding standards, version
        > control, self-written code checkers, etc.), I'm wondering how to apply
        > such knowledge and techniques to our own project.
        >
        > What I would like to do is to manage my VBA source code with CVS on a
        > Unix machine in the form of simple text files. I'd like to edit them
        > with an arbitrary text editor (probably Emacs). This would allow me -
        > for example - to write code-checkers, code-generators (maybe
        > generating functionality from a specification in XML), documentation
        > generators and so on in any scripting language I like (probably Perl).
        > In other words, I'd like to flee the built in Access IDE.
        >
        > The only remaining question is how to get text source files imported
        > into Access - if possible without any user interaction (that is: from
        > a script or C/C++ command line application, whatever).
        >
        > Does anyone know how to do this?
        >
        > Thanks in advance for any replies,
        >
        > Marco[/color]

        Comment

        • Marco Stolpe

          #5
          Re: How to import VB source text files into Access?

          Thanks to all for your help.

          I'll try out those functions as soon as possible. Those functions are
          what I was searching for.

          Greetings,

          Marco

          Tony Toews <ttoews@teluspl anet.net> wrote in message news:<nv9u10pjo 1n7iq41vdo4fgah jpsed51g2o@4ax. com>...[color=blue]
          > Chuck Grimsby <c.grimsby@worl dnet.att.net.in valid> wrote:
          >[color=green]
          > >
          > >Use the SaveAsText and LoadFromText functions. Both are part of the
          > >Access Application model.[/color]
          >
          > There's some sample code at Arvin Meyer's site.
          > http://www.datastrat.com/Code/DocDatabase.txt
          >
          > Tony[/color]

          Comment

          Working...