473,783 Members | 2,317 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Communication between MS Access and VB.NET

Hello!

I've got an MS Access Application and a VB.NET Application.

Now I want to to exchange information in real time between these two
applications.

For example the VB.NET application wants to know the name of the active Form
within the Access application. Or the Access application wants to know the
date within a textbox of the VB.NET application. And so on...

Both applications can run only once on a computer.

The problems are:
- How can VB.NET access the Access application?
- How can Access access the VB.NET application?
- Once the VB.NET application accessed the Access application, it can run
functions within the Access application. Is this possible reversely, too?

In priciple the two should be able to "talk" with each other.

I know that both applications could use DDE - but there must be a more
up-to-date option.

Any idea, how I can arrange this?
Many thanks already in advance for your help!
Greetings from Austria

Gerald
Nov 21 '05 #1
10 1771
Your best bet is to get hold of Visual Studio Tools For Office, this is the
most flexible way to interact with Office applications using VS2003 or
above.

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar( Convert.ToInt16 (ch(i)) - 1)
Next
Process.Start(" mailto:" & New String(ch))
--
"Gerald Bader" <ge****@gmx.a t> wrote in message
news:O2******** ******@TK2MSFTN GP14.phx.gbl...
Hello!

I've got an MS Access Application and a VB.NET Application.

Now I want to to exchange information in real time between these two
applications.

For example the VB.NET application wants to know the name of the active
Form
within the Access application. Or the Access application wants to know the
date within a textbox of the VB.NET application. And so on...

Both applications can run only once on a computer.

The problems are:
- How can VB.NET access the Access application?
- How can Access access the VB.NET application?
- Once the VB.NET application accessed the Access application, it can run
functions within the Access application. Is this possible reversely, too?

In priciple the two should be able to "talk" with each other.

I know that both applications could use DDE - but there must be a more
up-to-date option.

Any idea, how I can arrange this?
Many thanks already in advance for your help!
Greetings from Austria

Gerald

Nov 21 '05 #2
Hi!

Thanx for your fast reply!

The problem is, that the existing Access application is created with MS
Access 2000. So there are no .NET capabilities available.
Moreover I use the VS.NET 2002.
And I'm bound to these Versions.

What alternatives to DDE do exists in my case?
Greetings

Gerald
Nov 21 '05 #3
You can still use COM Interop, simply add a reference to the Access DDL in
your references section to access the ACCESS object hierarchy.

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar( Convert.ToInt16 (ch(i)) - 1)
Next
Process.Start(" mailto:" & New String(ch))
--
"Gerald Bader" <ge****@gmx.a t> wrote in message
news:en******** ******@TK2MSFTN GP12.phx.gbl...
Hi!

Thanx for your fast reply!

The problem is, that the existing Access application is created with MS
Access 2000. So there are no .NET capabilities available.
Moreover I use the VS.NET 2002.
And I'm bound to these Versions.

What alternatives to DDE do exists in my case?
Greetings

Gerald

Nov 21 '05 #4
aaj

I know it probably isn't as technical as it might be, but could you not use
the access database as a common entity between the two.

Maybe you could use events from both the .net and the access, and write the
current information from each to a common table.

Each app could then be triggered (timer/interrupt?) to see the current
status of the other from the common table

hope it helps

Andy
"Gerald Bader" <ge****@gmx.a t> wrote in message
news:O2******** ******@TK2MSFTN GP14.phx.gbl...
Hello!

I've got an MS Access Application and a VB.NET Application.

Now I want to to exchange information in real time between these two
applications.

For example the VB.NET application wants to know the name of the active
Form
within the Access application. Or the Access application wants to know the
date within a textbox of the VB.NET application. And so on...

Both applications can run only once on a computer.

The problems are:
- How can VB.NET access the Access application?
- How can Access access the VB.NET application?
- Once the VB.NET application accessed the Access application, it can run
functions within the Access application. Is this possible reversely, too?

In priciple the two should be able to "talk" with each other.

I know that both applications could use DDE - but there must be a more
up-to-date option.

Any idea, how I can arrange this?
Many thanks already in advance for your help!
Greetings from Austria

Gerald

Nov 21 '05 #5
Hi again!

I know COM interop.

But what I mean is, that these two applications are running.
And while they are running, they need to "find" each other in the current
Windows-Session and "talk" to each other.

This is what I need to achive.
Greetings

Gerald
Nov 21 '05 #6
Hi!

Thanks for your reply.

"aaj" <aa*@aaj.com> schrieb im Newsbeitrag
news:41******** *************** @news.easynet.c o.uk...

I know it probably isn't as technical as it might be, but could you not use the access database as a common entity between the two.

Maybe you could use events from both the .net and the access, and write the current information from each to a common table.

Each app could then be triggered (timer/interrupt?) to see the current
status of the other from the common table

What I meant with "real-time" is that one application should "ask": "What's
your current form?" and the other one should immediately "answer": "Its name
is 'Main-Form'."
If I use a timer, the user always had to wait until the Timer-Event was
fired.

I rather thought of the capability of the two applications to run functions
each within the other application.
But the problem is how to "find" the "applicatio n" object (or how you want
to call it) of each the other application within the current Windows
session.

Besides - what is an 'interrupt'?

Or is there possibility to send any Message from one application to another,
never minding if it is a .NET or a COM application?
hope it helps

Andy

Gerald
Nov 21 '05 #7
Gerald,
But what I mean is, that these two applications are running.
And while they are running, they need to "find" each other in the current
Windows-Session and "talk" to each other.


Just as advice forget it. Take the approach from AAJ,

When you do this you should have to make in my opinion a service which
accesses queues.
Probably that will be easier for VBNet than for Access, so you should start
your investigation with Access. However I would never take one minute in
that because with every new version you probably have to redesign

Just my thouhgt,

Cor
Nov 21 '05 #8
Hi,

Visual Studio tools for office only helps with word and excel.

Ken
-----------------
"One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Your best bet is to get hold of Visual Studio Tools For Office, this is the
most flexible way to interact with Office applications using VS2003 or
above.

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar( Convert.ToInt16 (ch(i)) - 1)
Next
Process.Start(" mailto:" & New String(ch))
--
"Gerald Bader" <ge****@gmx.a t> wrote in message
news:O2******** ******@TK2MSFTN GP14.phx.gbl...
Hello!

I've got an MS Access Application and a VB.NET Application.

Now I want to to exchange information in real time between these two
applications.

For example the VB.NET application wants to know the name of the active
Form
within the Access application. Or the Access application wants to know the
date within a textbox of the VB.NET application. And so on...

Both applications can run only once on a computer.

The problems are:
- How can VB.NET access the Access application?
- How can Access access the VB.NET application?
- Once the VB.NET application accessed the Access application, it can run
functions within the Access application. Is this possible reversely, too?

In priciple the two should be able to "talk" with each other.

I know that both applications could use DDE - but there must be a more
up-to-date option.

Any idea, how I can arrange this?
Many thanks already in advance for your help!
Greetings from Austria

Gerald


Nov 21 '05 #9
aaj
Hi again

There are probably better ways of doing what you need then my suggestion,
but that said, I think it would be extremely simple to implement, but maybe
it wouldn't give you the functionality you need, but anyway, just to
continue down the thought process....

perhaps if you defined a list of events that you are interersted in, when
any of the events are triggered (in either app) you could write details to a
table which is accessible by both apps i.e.

in Access, if you load form "main", then you write to the table some thing
like "ACCESS,FORM_OP ENED, main", when you close the form write
"ACCESS,FORM_CL OSED, main", you could be doing exactly the same in your .net
app this time something like "NET,FORM_OPENE D, form7", when you close it
write "NET,FORM_CLOSE D, form7", etc... i.e. this table would contiain a
running list of events, and the last entries of any particular category
would be the 'live' status available to be queried at any time. Maybe you
could even extend it to write a full structure to the data table.

Finding the status of App 1 on demand would be simple i.e. run a simple
query, that reads the result into a structure which you could use in the
rest of the App 2 program and vice-verse.

In each app, in the background maybe you could have some code that regulary
checked the status of your common table, that way if App 1 has a change then
within a very small time, app2 would know about it i.e something similar to
an event driven interrupt.

as I say, its probably no good to you anyway but always worth thinking of
different ways to solve a problem 8-)

hope its of some help

Andy

p.s. I'm not an expert, and I'm not sure if VB supports interupts, but in
the olden days I seem to remember you could set your software to check for
predifined events monitored in the background by the operating system, the
code would run without you worring you too much, but if the event occured
i.e. something changed, the OS would notify you, and you could set your
software to go off and do the necessary and when it was done, return back to
the place where the event occured (or that was the theory anyway )

"Gerald Bader" <ge****@gmx.a t> wrote in message
news:OY******** ******@TK2MSFTN GP14.phx.gbl...
Hi!

Thanks for your reply.

"aaj" <aa*@aaj.com> schrieb im Newsbeitrag
news:41******** *************** @news.easynet.c o.uk...

I know it probably isn't as technical as it might be, but could you not

use
the access database as a common entity between the two.

Maybe you could use events from both the .net and the access, and write

the
current information from each to a common table.

Each app could then be triggered (timer/interrupt?) to see the current
status of the other from the common table


What I meant with "real-time" is that one application should "ask":
"What's
your current form?" and the other one should immediately "answer": "Its
name
is 'Main-Form'."
If I use a timer, the user always had to wait until the Timer-Event was
fired.

I rather thought of the capability of the two applications to run
functions
each within the other application.
But the problem is how to "find" the "applicatio n" object (or how you want
to call it) of each the other application within the current Windows
session.

Besides - what is an 'interrupt'?

Or is there possibility to send any Message from one application to
another,
never minding if it is a .NET or a COM application?
hope it helps

Andy

Gerald

Nov 21 '05 #10

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

Similar topics

3
5349
by: ^CeFoS^ | last post by:
Hi to everybody, due to I want to use the serial port of a server machine through an applet allocated in html document. > Then one application will run in the server machine and using > the serial port. The other application that will be called in the html > document that it'll allocate the frame with the user interfaz and > it'll manage the events (applet). > > But I have any questions. I suppose the server application will be > running...
1
8857
by: Andreas Horneff | last post by:
Hi @ all, I've got a problem with serial communication in Borland C++ Builder. I've already found a lot of stuff about serial communication in the internet, but it dosen't work. What I want to do: I want to connect only one button to my com port. If the button is pressed,
3
43229
by: Tim Reynolds | last post by:
I support a .Net application running on a SERVER accessing MF Db2 data. Occasionally, we have some type of connection problem that we have been unable to debug up to this point. We typically receive one of these IBM.Data.DB2.DB2Exception messages: ERROR SQL30081N A communication error has been detected. Communication protocol being used: ‘TCP/IP'. Communication API being used: ‘SOCKETS'. Location where the error was detected:...
3
1963
by: Bryan Christopher | last post by:
Hello All! I have a rather abstract question for some genius out there to answer. I want to integrate communication tracking, for customer relations, into an existing Access DB. What I was going for is this... tblCommunications trxCommunicationThreads ----------------- ----------------------- CommunicationID (PK) CommID1 (FK1)(PK) ContactID (FK from contact table) CommID2...
13
4988
by: Krzysztof Bartosiewicz | last post by:
Hi! I have a problem with an access database. The database which I designed and made using MS access works perfectly OK on my computer however it is not working at all on computers for which it was done :) When the client tries to open first form the access shows information about error connected to the communication between Access and OLE or Active-X control. The problem is that I cannot go to the client's computer and test it because
4
4962
by: Viper Venom | last post by:
Dear All: I am trying to write an application that consist 2 executables 1) Server.exe 2) Client.exe I start the server.exe first and then start the two client exe by code and kill both of the client when the server exit (This is already done)
2
5139
by: Leonardo D'Ippolito | last post by:
Hi! I have two .NET win apps that need to communicate on a TCP/IP network. 'App A' must ask 'app B' if it's allowed to do some task, and 'app B' must authorize or prohibit it. How can I do this kind of communication in a secure way (protected from sniffing)? It would be a very simple protocol. Question, and two possible answers 'yes' or 'no'.
7
2055
by: Michael Butscher | last post by:
Hi, this is not really Python-specific but I need it for Python. I'm wanting a method for interprocess communication which is OS- independent (sockets would be the normal way to go), but which works if multiple users use the machine at the same time so that one user has no access to the communication of programs of another user. Normally any user could connect to an open socket on a machine
1
1821
by: hardikpatelmca | last post by:
Hi everybody, I want to create web application using C# and live communication server. User can set his presence information, view other presence information and send instant messages. How can I start developing in C# web application using live communication server? I doesn't want to use Communicator Web access. If you have any tutorial, then please provide to me. It is very appreciate if you provide some code example. I am beginner...
5
3176
by: AeonOfTime | last post by:
Let's assume a web application (in this case a browser-based game) with a custom HTTP server built on PHP, and a client also built on PHP. The client uses the server to access and change data. Even if the client server communication is not directly visible to the user (who logs into the client), the fact that the server is publicly accessible (a port sniffer would be enough to find it) means the communication has to be secured. How...
0
9643
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
9480
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
10147
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
8968
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
7494
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
6735
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.