Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Run-time error '40002'

481 views
Skip to first unread message

Nicholas

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
I have instaled SQL 6.5 client on Win95. And develop a VB program to access
the server with code.

Sconnect = "UID=" + SQL_uid + ";PWD=" + SQL_pwd + ";Driver={SQL Server};" +
"Server=NYLHKNT03;Database=" + DBName
Set En = rdoEnvironments(0)
Set Cn = En.OpenConnection(dsName:="", Prompt:=rdDriverNoPrompt,
Connect:=Sconnect)

The ODBC driver version is 2.65.0252

Every thing is OK on development machine. But install to user's PC the error
message occurred.

Error message
Run-time error '40002':
08001: [Microsoft][ODBC SQL Server Driver]Unable to connect to data source

Can anyone help???

DPSatHyp

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
40002 is just the generic ODBC - SQL Server error message. If you look at
the rdoerrors collection, you will see a list of all the errors. Also, are
you sure the user is a user of the database (DBName).

Thanks,
Dave
(Please respond to the newsgroup.)

Nicholas <wn...@asiaonline.net> wrote in message
news:7nkb3g$dp...@news.asiaonline.net...

Jim Dault

unread,
Aug 1, 1999, 3:00:00 AM8/1/99
to
Assure that the user is set up to access a DNS server. You can verify this
by replacing server NYLHKNT03 with its associated IP address, then run it on
your user's machine.

Jim Dault


Nicholas wrote in message <7nkb3g$dp...@news.asiaonline.net>...

chris

unread,
Aug 9, 1999, 3:00:00 AM8/9/99
to
I would try using a more current ODBC driver than that one, I have had
problems with that version of the driver. I find that 3.60 or above works
well. Download mdac_typ.exe or mdac_typ2.exe from microsoft.com.

Chris

0 new messages