Wednesday, March 7, 2012

Connecting to a Remote SQL Server From VB6

Hello,
I'm trying to connect to an SQL 2K server. The problem is that when using XP
it seems to work fine, but in Win 2k it simply does not work. I get an
Unable to fine host error (GetHostserver error). I'm using a dsn/dao to set
up the connection. I do a direct connection (Don't connect to the remote
server) it works fine on both OS.
This is what my cnn string looks like
gstrODBC.DSN = "DSN_NAME"
gstrODBC.DataSource = "Database=DATABASE" & vbCr & _
"Description=CSMisc" & vbCr &
"Server=SQL_SERVER\SQL_SERVER\" & vbCr &
Network=DBMSSOCN"
gstrODBC.Login = "ODBC;uid=USER_NAME;pwd=PASSWORD"
Thank you!!!!
Alex"Alex" <xoxo@.xoxo1.com> wrote:
> Hello,
> I'm trying to connect to an SQL 2K server. The problem is that when using
XP
> it seems to work fine, but in Win 2k it simply does not work. I get an
> Unable to fine host error (GetHostserver error). I'm using a dsn/dao to
set
> up the connection. I do a direct connection (Don't connect to the remote
> server) it works fine on both OS.
--
Hi Alex,
Some steps to troubleshoot connectivity problems from your Windows 200
client to SQL Server 2000:
1. Ping the SQL Server machine name. Does it work?
2. Do a net view to the SQL Server machine. Does it work?
3. Click the test ODBC connection button from the DSN dialogue. Does it
work?
4. See if you can connect via Query Analyzer.
Hope this helps,
-Eric Cárdenas
SQL Server support

No comments:

Post a Comment