Silent Killer -- Telling if a Certain Computer Is a Member of a Domain or Not

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
 
B

Bill Sanderson

Minn - these groups are for support of Microsoft Antispyware.

This question isn't on topic, and I'm not at all sure anyone reading these
groups regularly has the expertise to answer your question.

You'd be best off in a developer-oriented group, perhaps one related to the
language or framework you are using for development.

You might also try microsoft.public.windowsxp.network_web, in a pinch.

Here's a web reference to that group (I think!)

http://support.microsoft.com/newsgroups/?pr=1173



--
 
G

Guest

My first time in this Microsoft "Mega Information Mall" and I already lost
my way -- thanks for pointing me to the right direction .. I will try that
link.

Minn
 
B

Bill Sanderson

Not a problem--and keep an eye out--you never know when somebody who knows
the answer will be reading in an unexpected place.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top