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

How to establish connection to TCP port 13 on a remote server from within VBA?

MLH
I wrote a letter to NIST in Boulder, Colorado asking how to glean
time/date from their servers from inside an Access 97 app and
VBA. Their reply is shown below. Trouble is, I do not know how
to do what they've recommended. Anybody on this forum know
what is specifically needed?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
Hello,
I'm sure the Daytime Protocol (RFC-867) is much better imple-
mented. I would like to know how to implement it from
within Visual Basic on a web-enabled PC.


Establish a connection to tcp port 13 on any of our servers. The
server will respond with a single line of text giving the date and
time in a rather obvious format.
The time message is derived directly from our atomic clock ensemble,
and it should be accurate to about 0.1 seconds or better.
I don't know how eBay determines the time, and I don't know if it
is correct.

Judah Levine
Time and Frequency Division
NIST Boulder
Nov 13 '05 #1
8 3334
MLH <CR**@NorthState.net> wrote in
news:1f********************************@4ax.com:
I wrote a letter to NIST in Boulder, Colorado asking how to glean
time/date from their servers from inside an Access 97 app and
VBA. Their reply is shown below. Trouble is, I do not know how
to do what they've recommended. Anybody on this forum know
what is specifically needed?


I did extensive Googling on this, in the hopes of finding code that
directly uses WSOCK32 to do the task, but all I found was examples
that use winsock ActiveX controls.

I couldn't even find a listing for the WSOCK32 API, since it's quite
obvious that it can do the job.

The code for some of the controls was *very* easy, though, but I
just don't believe in implementing outside dependencies in my Access
apps.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #2
MLH
>I did extensive Googling on this, in the hopes of finding code that
directly uses WSOCK32 to do the task, but all I found was examples
that use winsock ActiveX controls.

I couldn't even find a listing for the WSOCK32 API, since it's quite
obvious that it can do the job.

The code for some of the controls was *very* easy, though, but I
just don't believe in implementing outside dependencies in my Access
apps.


Agree with you totally on the last point. References can get
out-a-control when you start relying on outside dependencies.
Not to mention the fact that, if it breaks, you can't fix it and
you probably can't get anyone to fix it.
Nov 13 '05 #3
On Mon, 03 Oct 2005 14:03:43 -0400, MLH <CR**@NorthState.net> wrote:
I wrote a letter to NIST in Boulder, Colorado asking how to glean
time/date from their servers from inside an Access 97 app and
VBA. Their reply is shown below. Trouble is, I do not know how
to do what they've recommended. Anybody on this forum know
what is specifically needed?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx
Hello,
I'm sure the Daytime Protocol (RFC-867) is much better imple-
mented. I would like to know how to implement it from
within Visual Basic on a web-enabled PC.


Establish a connection to tcp port 13 on any of our servers. The
server will respond with a single line of text giving the date and
time in a rather obvious format.
The time message is derived directly from our atomic clock ensemble,
and it should be accurate to about 0.1 seconds or better.
I don't know how eBay determines the time, and I don't know if it
is correct.

Judah Levine
Time and Frequency Division
NIST Boulder


Hi
Use the time server to keep your PC clock in time, and just read that from
Access.
See freeware at http://www.snapfiles.com/freeware/ne...wtimesync.html

Nov 13 '05 #4
MLH
Although I appreciate the work-around suggesting, I'm looking for an
actual technique here. I want to establish the connection from within
VBA - controlling everything from within code.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx

Hi
Use the time server to keep your PC clock in time, and just read that from
Access.
See freeware at http://www.snapfiles.com/freeware/ne...wtimesync.html


Nov 13 '05 #5
MLH <CR**@NorthState.net> wrote in
news:8n********************************@4ax.com:
I did extensive Googling on this, in the hopes of finding code
that directly uses WSOCK32 to do the task, but all I found was
examples that use winsock ActiveX controls.

I couldn't even find a listing for the WSOCK32 API, since it's
quite obvious that it can do the job.

The code for some of the controls was *very* easy, though, but I
just don't believe in implementing outside dependencies in my
Access apps.


Agree with you totally on the last point. References can get
out-a-control when you start relying on outside dependencies.
Not to mention the fact that, if it breaks, you can't fix it and
you probably can't get anyone to fix it.


I'm more concerned with issues of distributing a control with your
app, and of possible incompatibilities that could be introduced in
revisions of Windows.

I just don't quite understand why there aren't more examples of
using the WSOCK32 API directly in VB.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #6
MLH wrote:
Although I appreciate the work-around suggesting, I'm looking for an
actual technique here. I want to establish the connection from within
VBA - controlling everything from within code.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx

Hi
Use the time server to keep your PC clock in time, and just read that from
Access.
See freeware at http://www.snapfiles.com/freeware/ne...wtimesync.html


If you are looking for examples on how to use the WinSock library under VB then there are
many examples on the net. Port 13 has very limited usefulness as it is reserved (as a
"well-known port) for the "daytime" protocol defined by the RFC found here:
http://www.faqs.org/rfcs/rfc867.html

For an accurate time source you'll want to use a modern protocol like NTP or Simple NTP
(SNTP).

For a WinSock example see:

http://www.vbip.com/winsock-api/default.asp

--
'---------------
'John Mishefske
'---------------
Nov 13 '05 #7
MLH
Judah Levine did write me back. I haven't had time to
look at his recommendations yet. And, he indicated too
that he had no knowledge of such VBA tools.
Hello,
I appreciate your reply. Unfortunately, we can find no tool
that can be implemented from within VBA to make what you are
suggesting happen, that is - from within an MS Access application
and VBA...


I don't know anything about VBA -- I have never used it and our
client software is written in C.
I don't know if it would be of any help, but you can get a
number of example programs from our servers. For example, look at
the files in directory:

ftp://time.nist.gov/pub/daytime

Specifically, look at tcp_time_client.c, which shows a bare-bones
version
in C. If VBA does not support network socket connections, then it
might be possible to implement the connection in a VBA subroutine
written in C. I have never done this, but I assume that it is
possible.
However, my guess is that VBA supports winsock network calls, and it
is just a matter of getting the correct syntax using the C calls as
a guide.

Good luck.

Judah Levine
Time and Frequency Division
NIST Boulder

Nov 13 '05 #8
MLH
Thx, John. I'll have a look at that when I get a moment.
Regards, Mike H.
Nov 13 '05 #9

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

Similar topics

0
by: TJ | last post by:
Dear Sir/Madam I made one user control using C#(.NET Runtime is 1.1). It is embeded in Internet Explorer Basically, this control is very similiar to FTP client program. So it should be connecte...
9
by: Niyazi | last post by:
Hi, I can connect using my PC local SQL Server Enterprise manager to Remote SQL Server. But I cannot connect using my Connection string? strConn = "Data Source=190.168.0.97,1433;Network...
5
by: lazydb2dba | last post by:
I would like to know if there is any reason that a connection port is not listening. I've found the following message in my db2diag.log DIA3003E Error encountered in "TCPIP" protocol support....
1
by: TJ | last post by:
Dear Sir/Madam I made one user control using C#(.NET Runtime is 1.1). It is embeded in Internet Explorer Basically, this control is very similiar to FTP client program. So it should be connecte...
3
by: Randy | last post by:
Hello, I've got a Windows client app which hits a web service. The web service works fine unless I'm outside the firewall using a VPN connection. I know my VPN connection is working fine because I...
1
by: C.W. | last post by:
I am trying to connect to a remote server in order to perform an http post inside my asp.net page. However, I consistently get the following error: System.Net.Sockets.Socket.Receive(Byte...
7
by: cyberbilly1 | last post by:
Hi All! I'm trying to connect to a remote oracle database using the OracleConnection within VB.net . Whenever I try connecting I get a SocketException:No connection could be made because the...
3
by: Adhal | last post by:
Hi, I am using remoting to pass in parameters from new launches of an application. So basically I have only one instance of the application and I am using remoting to pass the parameters. ...
2
by: devas | last post by:
Hai, Issue: I am using OEM 10g grid control. I want to establish the connection from oracle to sql server=>I can’t able to connect it. Please help me I have created the system dsn below steps....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...
0
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,...
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
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,...
0
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...

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.