This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Problem while establishing a connection.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 09, 2008
10:54 PM
Problem while establishing a connection.
My app allows user browse SQL Server (I use function SQLBrowse2( szConnection, svServer )).
User have to provide conn type (win or sql), username, pwd.
My app have a button to test connection (use function SQLRTTestConnection2( szConnection, szServer, szDB, szUserName, szPassword, bTrust) to test).
I met the following trouble: If szServer is SQL Server's IP, test conn will be successful. But if szServer is the name of SQL Server (value return from function SQLBrowse2), test conn will be failed (return code = 1:The function failed to establish a connection.)
However if szServer is my PC's name, the connection will be successful.
Plz give me a solution, thank you very much.
User have to provide conn type (win or sql), username, pwd.
My app have a button to test connection (use function SQLRTTestConnection2( szConnection, szServer, szDB, szUserName, szPassword, bTrust) to test).
I met the following trouble: If szServer is SQL Server's IP, test conn will be successful. But if szServer is the name of SQL Server (value return from function SQLBrowse2), test conn will be failed (return code = 1:The function failed to establish a connection.)
However if szServer is my PC's name, the connection will be successful.
Plz give me a solution, thank you very much.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 10, 2008
01:28 PM
Are you trying to connect to the default instance (MYPC) or a named instance (MYPC\SQLEXPRESS)?
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)