M
Minn
Is there a function that I may not know about that will
allow me to tell programmatically if the user is
part/member of a domain or not?
I am not an expert about this domain stuff but it is how
our network guy explained it to me. The big picture is
this - our administrator has exposed to me some
table/view from which my program grabs information and
pumps those information into another application.
The program has been working seamlessly for months now
inside the office and so they decided to deploy it to
everybody including offsite people connected to our
network only by VPN.
All of a sudden when the offsite people tried it - I
started receiving phone calls from everywhere (from
offsite people) asking why the program does not work on
their machines.
The behavior is such that the GUI would be on the screen
for a long time without doing anything. After analyzing
it I have seen the culprit. It is one line of code that
kills the program silently -- a silent deadly killer!
cns.Open strConnect
as soon as the program hits that line of code above (for
offsite people) it wont issue any error message it will
just stop right there dead on the spot without doing
anything - and the program cannot move into to the next
line of code even when I do an On Error Resume Next.
Below is how I constructed my ado connection. What I know
is that ConnectionTimeout is in milliseconds so with the
5000 as 5 seconds in my mind - I have ruled it out
entirely - as as way to make the car wheels escape from
the muddy rut so to speak.
Set cns = New ADODB.Connection
strConnect = "Provider=SQLOLEDB;Password=35345;User
ID=readonly;Initial Catalog=CatMa;Data
Source=OurDataSource"
cns.ConnectionTimeout = 5000
cns.CommandTimeout = 0
If I can only make the program move from that one line of
code and continue I am confident that I can somehow
manage to build something that will work for all those
offsite people.
I talked to the network guys and they told me that the
difference between the people in the office and the
offsite guys is that the people in the office are members
of the domain whereas those connecting offsite using VPN
are not members -- thus my question on detecting if a
user is a member of domain or not.
If I can make the program detect that user is not a
member of the domain -- I can make the program branch
away from the silent deadly spot.
As a temporary work around I have started asking those
offsite people for their loginname and using that
loginname to make the program branch away from the silent
deadly killer line.
It is so awkward though that it makes both them and I
uncomfortable doing this for obvious reasons. Does anyone
know how I can gracefully handle this problem. Please
advise.
Thank you so much for all the kind help you can give.
Minn
allow me to tell programmatically if the user is
part/member of a domain or not?
I am not an expert about this domain stuff but it is how
our network guy explained it to me. The big picture is
this - our administrator has exposed to me some
table/view from which my program grabs information and
pumps those information into another application.
The program has been working seamlessly for months now
inside the office and so they decided to deploy it to
everybody including offsite people connected to our
network only by VPN.
All of a sudden when the offsite people tried it - I
started receiving phone calls from everywhere (from
offsite people) asking why the program does not work on
their machines.
The behavior is such that the GUI would be on the screen
for a long time without doing anything. After analyzing
it I have seen the culprit. It is one line of code that
kills the program silently -- a silent deadly killer!
cns.Open strConnect
as soon as the program hits that line of code above (for
offsite people) it wont issue any error message it will
just stop right there dead on the spot without doing
anything - and the program cannot move into to the next
line of code even when I do an On Error Resume Next.
Below is how I constructed my ado connection. What I know
is that ConnectionTimeout is in milliseconds so with the
5000 as 5 seconds in my mind - I have ruled it out
entirely - as as way to make the car wheels escape from
the muddy rut so to speak.
Set cns = New ADODB.Connection
strConnect = "Provider=SQLOLEDB;Password=35345;User
ID=readonly;Initial Catalog=CatMa;Data
Source=OurDataSource"
cns.ConnectionTimeout = 5000
cns.CommandTimeout = 0
If I can only make the program move from that one line of
code and continue I am confident that I can somehow
manage to build something that will work for all those
offsite people.
I talked to the network guys and they told me that the
difference between the people in the office and the
offsite guys is that the people in the office are members
of the domain whereas those connecting offsite using VPN
are not members -- thus my question on detecting if a
user is a member of domain or not.
If I can make the program detect that user is not a
member of the domain -- I can make the program branch
away from the silent deadly spot.
As a temporary work around I have started asking those
offsite people for their loginname and using that
loginname to make the program branch away from the silent
deadly killer line.
It is so awkward though that it makes both them and I
uncomfortable doing this for obvious reasons. Does anyone
know how I can gracefully handle this problem. Please
advise.
Thank you so much for all the kind help you can give.
Minn