Connecting Tech Pros Worldwide Forums | Help | Site Map

How to import VB source text files into Access?

Marco Stolpe
Guest
 
Posts: n/a
#1: Nov 12 '05
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]
Guest
 
Posts: n/a
#2: Nov 12 '05

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@freenet.de> wrote in message
news:65d35fc1.0402020743.5edcdfd6@posting.google.c om...[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]


Tony Toews
Guest
 
Posts: n/a
#3: Nov 12 '05

re: How to import VB source text files into Access?


Chuck Grimsby <c.grimsby@worldnet.att.net.invalid> 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.
http://www.datastrat.com/Code/DocDatabase.txt

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
http://www.granite.ab.ca/accsmstr.htm
TC
Guest
 
Posts: n/a
#4: Nov 12 '05

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@freenet.de (Marco Stolpe) wrote in message news:<65d35fc1.0402020743.5edcdfd6@posting.google. 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]
Marco Stolpe
Guest
 
Posts: n/a
#5: Nov 12 '05

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@telusplanet.net> wrote in message news:<nv9u10pjo1n7iq41vdo4fgahjpsed51g2o@4ax.com>. ..[color=blue]
> Chuck Grimsby <c.grimsby@worldnet.att.net.invalid> 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]
Closed Thread