473,396 Members | 1,775 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,396 software developers and data experts.

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 1730
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/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
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.at> wrote in message
news:O2**************@TK2MSFTNGP14.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/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
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.at> wrote in message
news:en**************@TK2MSFTNGP12.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.at> wrote in message
news:O2**************@TK2MSFTNGP14.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.co.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 "application" 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****************@TK2MSFTNGP12.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/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
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.at> wrote in message
news:O2**************@TK2MSFTNGP14.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_OPENED, main", when you close the form write
"ACCESS,FORM_CLOSED, main", you could be doing exactly the same in your .net
app this time something like "NET,FORM_OPENED, form7", when you close it
write "NET,FORM_CLOSED, 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.at> wrote in message
news:OY**************@TK2MSFTNGP14.phx.gbl...
Hi!

Thanks for your reply.

"aaj" <aa*@aaj.com> schrieb im Newsbeitrag
news:41***********************@news.easynet.co.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 "application" 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
I dont think thats strictly true, the templates are pre-defined for Word and
Excell but the ability to communicate with access is there as is with
powerpoint.

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

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
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))
--
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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****************@TK2MSFTNGP12.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/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
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.at> wrote in message
news:O2**************@TK2MSFTNGP14.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 #11

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

Similar topics

3
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...
1
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...
3
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...
3
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...
13
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...
4
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...
2
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...
7
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...
1
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...
5
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.