473,566 Members | 3,245 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1791
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
2246
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. It seems like PyModule_AddObject should work but it segfaults my program. There's a good chance I'm just using it wrong, or I should be using...
8
4155
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 have an existing VC++ project that mostly just reads a SQL Server database does some work on the data and insert the results into another table. I...
47
3819
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
4
4863
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 create a web service in c# using paradox data. The data is stored locally on my development machine with IIS also installed. Web services are working...
3
1331
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 necessary class declarations.
0
1492
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 External Data -->New Database Query. Last week I connected quickly and reliably. As of Monday morning, It now takes 7.5 minutes to connect to the DB...
3
7764
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 residing in a different translation unit, then the current translation unit was simply oblivious to it and had no way of accessing it. Any time the...
21
3860
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 applies in this case though: #include <limits.h> unsigned foo(void) { static const union { unsigned char str;
1
1143
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 add-in via object model but with no results.. Is it possible to intercept the add-in events? Thanks
0
7673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6263
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.