473,426 Members | 3,031 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

Accessing external functions from Access...

Hi all,

I am developing an Access database application that requires some
additional, non-database related functionality. This additional
functionality is essentially to validate a flat text file provided by
an external data provider. I am proposing to add a button to one of
the forms in my application to perform this validation and then pop up
a message box indicating whether the flat file is valid or not. This
is in preference to building a separate application just to validate
the flat file.

My inital idea was to code the validation using VBA code behind the
form, to read the flat file line by line and check the syntax of the
data fields in each position. However, upon inspection the flat file
is more complex than I expected so I need to do something else. I have
used lexical parsers in the past for scaning and validating complex
flat files and this seems to be the perfect solution, however I am
unsure which path to pursue as far as linking an external module into
my VBA application. The parser will be generated in Java so I have the
option of linking my parser class files to my VBA application and
calling them that way or I could compile the parser classes into native
code and use shell calls within Access to invoke the EXE. I have not
done either of these things using VBA but I've looked on the net and
both options seem viable, I'm not sure which is the best approach in
this situation.

In my past experience with Java parsers, they have always been called
from a Java application, so I can pass a text file to the parser class
and it returns a boolean for pass or fail. If I call an EXE (my
natively compiled Java class) will I get this return value back in my
VBA application..? I have thought about creating the parser as a DLL
which would link to my VBA applicaiton but don't have much experience
with this approach either so I'm not sure if it's possible in this
situation.

I have no problems getting the parser to work or completing the VBA
application, my weakness at this point is integrating the two. Any
suggestions or advice would be most appreciated.

Many thanks and regards,
Lyndon.

Oct 4 '06 #1
1 1785
Couldn't you port the parser to VBA? I do have a syntax checker for [a
grammar that can be put in a table], if you want to use that, flag me.

A shell call doesn't return a value from the program you call; it
doesn't even wait for that program to complete. Best bet is to use a
semaphore: your parser should write some file, of which VBA can check
the presence (presumably in a Timer event procedure so it won't lock up
your computer)

Lyndon schreef:
Hi all,

My inital idea was to code the validation using VBA code behind the
form, to read the flat file line by line and check the syntax of the
data fields in each position. However, upon inspection the flat file
is more complex than I expected so I need to do something else.
--
Bas Cost Budde
Holland
www.heuveltop.nl/BasCB/msac_index.html
Oct 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Gary | last post by:
Hi- I've been searching the web for a while and I've been unable to find a way to access c data objects in python without using SWIG. I can do methods just fine but I can't access variables. ...
8
by: Scott Allen | last post by:
Hello, I'm new to C++ development and I'm trying out figure out the cause of an 'unresolved external symbol' error that I'm receiving when compiling. Here is some history on what I'm doing: I...
47
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
4
by: Eugen Walcher | last post by:
Hello all, I've tried posting this same question on other newsgroups with no luck. This group seems to have a lot more activity so I apologize if you have seen it before. I'm trying to...
3
by: Dave | last post by:
I've seen at least one article on this: How to access classes, etc. managed-to-unmanaged. I can't find it. Any tricks or pointers? I guess the class name won't get munged but I'm not clear about...
0
by: jd_12345 | last post by:
Windows XP Pro SP2 Excel 2003 SP2 IBM DB2 Personal Edition accessing a DB2 database on an AIX server via the DB2 ODBC driver I am accessing an external DB via MS Excel using Data-->Import...
3
by: Frederick Gotham | last post by:
Back in the day, if you wanted a function to be self-contained within a translation unit, you defined the function as "static". If there were an external linkage function by the same name...
21
by: Hallvard B Furuseth | last post by:
Is the code below valid? Generally a value must be accessed through the same type it was stored as, but there is an exception for data stored through a character type. I'm not sure if that...
1
by: =?Utf-8?B?R2FldGFub0c=?= | last post by:
Hi all, I build a com add-in for word 2003/2007 using c# and it works well. Now I need to set variable values and run funcions from an external .net program. How can I do? I tried to access the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.