MS Access communication via TCP/IP

Hi!  anyone have any luck with a "TELNET" like connection with MS ACCESS?    I send simple text commands to a connected unit via TELNET.    By TELNET I mean using a communications application that converses with a connected device via IP address.     Something like sending "readbuffer01" and a response like "0,00.4,2" is returned by the conneted device.   I do this over a TELNET application like Tera Term set up for IP of the connected device xxx.xxx.xxx.xxx format for IP and TCP/IP port 3602 emulating a VT100 terminal.   Any way that ACCESS can send commands and listen for a response like these terminal programs.   I am basically trying to automate data collection over the tcp/ip connection and store in a form/table.

Thanks!
Brian
bswg3549ownerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
Can you do it? Yes. Should you do it? No.

What is your concrete use-case? What are your skills?

Cause my approach would be a Windows service written in .NET, cause it's much better suited for this kind of tasks.
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Unlike ste5an, I would not say "No".

 This has been done for many years in VB and VBA and you can do it in one of three ways:

1. Buy a 3rd party control.  i.e.:

http://www.dart.com/winsock-activex-api-library.aspx


2. Use the VB6 winsock control:

Beginers Winsock example
http://www.freevbcode.com/ShowCode.Asp?ID=1212

3. Or go low level and all the Winsock API directly:

https://www.keysight.com/main/editorial.jspx?ckey=1000001131:epsg:sud&id=1000001131:epsg:sud&nid=-32503.0.00&lc=eng&cc=US

 The last might be the most interesting as it's an example of instrument control.

 and there are tons of each of these out on the net.

Jim.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ste5anSenior DeveloperCommented:
hmm, the question sounds like he wants to build a server, not a client.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<I am basically trying to automate data collection over the tcp/ip connection and store in a form/table.>>

 Sounds like a client to me....but it doesn't matter.  Access can do both.   I don't know that I'd leave it running 24x7.    I typically like to write small utilities that startup, do what they need to do, and shutdown.   Depends on the requirements though and I've done things both ways.

I wrote a time clock polling system in Access that used low level API calls to Ingersall Rand's Handpunch clocks over TCP/IP.   It ran 24 x 7 on a server without issue.

The problem though that you alluded to in suggesting .Net is that Access is a foreground app and you can't run it as a system service.  You can run it in the tray, but not as a true system service.   So you need a session that's logged in all the time.   It can be locked, but it needs an open session that has a desktop.

If you can live with that, then outside of that, it works fine for all sorts of things.

Jim.
0
bswg3549ownerAuthor Commented:
I would actually want this to be event based from a form - so very infrequent.  I fill in an ip address of the connected remote device, access opens a socket and issues the command and reads the response.     I think the excel example you gave is very close to what I want to do, so need to do some studying.  I have made Access do a lot of weird things through VB, but the win socket thing is totally new to me, but it looks like what I want.  I really appreciate everyone quick response.   I am marking your answer as my solution as i firmly believe it will get me there.  Thanks!
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Yes, from your question, the Excel VBA code smacks the closest and you don't need anything but Access.   It's the way I'd go.  Might be a little more work because your making low level calls, but all the basics of doing it are there.

Jim.
0
bswg3549ownerAuthor Commented:
Thanks everyone - I REALLY appreciate your time!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.