473,837 Members | 1,726 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 1805
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
2259
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 something else. Could someone give me a simple, complete example pretty please? Thanks!
8
4174
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 have the need to incorproate some functionality from a certain dll named cedb300.dll. cedb300.dll...
47
3893
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
4
4886
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 to the point where I can return strings and ints using Access2000 data but whenever I try and...
3
1346
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
1503
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 and all the while the hard disk is spinning constantly. Another tool no longer connects at all with...
3
7854
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 function name was mentioned in the current translation unit, it referred to the "static" one which...
21
3919
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
1153
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
9846
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9683
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10883
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10579
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9412
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7814
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5674
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5852
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3126
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.