[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 795
  • Last Modified:

Communicate with Ethernet Device

I have an ethernet device that I need to communicate with in either vba (access 2003) or visual basic 2008 or visual C++ 2008.  I am most familiar with vba, then vb2008, the visual c++ 2008.

I need to open a communication channel with the device, need to send commands to the device, and need to read results from the device.

What are the commands I need to handle this communication?  Is it best to use win api or other?  I really have limited knowledge on socket type programming.  I have only communicated to ethernet devices in character based Unix C using AF_INET structures (about 5 years ago).  I handle serial communications using WIn API.

Any help would be greatly appreciated.  I am a novice on this subject.
0
compuzak1
Asked:
compuzak1
  • 4
  • 3
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Well, within Access VBA, you would need to use API calls for sure.

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You might find something here that would help you:

http://www.mvps.org/access/api/index.html

All of this works from inside Access VBA.

mx
0
 
Gustav BrockCIOCommented:
If you insist on using VBA, you would probably need the WinSock control to get the work done. An example of using this for a syslog sender and receiver is found here:

  http://www.devx.com/vb/Article/42242

You should be able to adopt it for your specific use.

That said (or written), I would use Visual Studio (.Net) for this task if at all possible.

/gustav
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
compuzak1Author Commented:
Cactus, do you have any examples that I can use as a basis in visual studio?  

I will use Visual Studio per your recommendation.  I have a short deadline and need to get up to speed as fast as possible.  What resources would you recommend for getting started in Visual Studio.  I have a lot of programming design/development experience, just none in Visual Studio.
0
 
Gustav BrockCIOCommented:
Yes, here is a very basic example but even though perhaps close to what you need:

http://www.c-sharpcorner.com/uploadfile/sthangaraju/tcpclientserverst11182005014316am/tcpclientserverst.aspx

However, I've only used the SMTP service (which works great) so I cannot supplement with practical details.

/gustav
0
 
compuzak1Author Commented:
That looks like what I need.

Do you have any advice on where to find documentation that will jump start me with Visual Studio?  Need to create program, make an exe, the basic stuff.  I am sure I can figure it out, but if you have a good guide on "getting started with Visual Studio" it might save me some time.
0
 
Gustav BrockCIOCommented:
There is _much_ stuff for the finding ...

This is the official starter kit:

http://www.microsoft.com/express/Resources/

Also, I enjoyed the free stuff from this source:

http://www.learnvisualstudio.net

/gustav
0
 
compuzak1Author Commented:
This example was excellent and did everything I needed for my simple communication.  

The training references below are also a big help.

Thanks for saving me a bunch of time.
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now