Click to See Complete Forum and Search --> : Dialup connection to SQL Server
honeybee
Nov 17th, 2000, 08:40 PM
When I try to connect to a Win NT Server using a dialup connection it works fine. But over this connection if I try to connect to the SQL Server database on the server, the ADO Data Control fails to establish the database connection. If I use an Access database, the ADO Data Control immediately picks it up.
What is wrong with the SQL Database? How do I correct it?
honeybee
Nov 20th, 2000, 01:50 AM
Don't tell me none of the members on this forum have tried it.
C'mon, someone must have a hint as to how it is done.
Skeen
Nov 20th, 2000, 04:06 AM
Have you set up the ODBC driver?
honeybee
Nov 20th, 2000, 09:52 AM
ODBC? What's that?
I mean with ADO, why should I use ODBC? The data control should be able to make a DSN-less connection. Funny thing is it does this with an Access database on the NT Server, but doesn't pick up any SQL Databases.
Skeen
Nov 20th, 2000, 09:54 AM
Post some code, connection string etc
honeybee
Nov 20th, 2000, 10:55 AM
Here is the code:
Start VB6
Go to Project > Components and add ADODC to your project.
Add an instance of the ADODC to your form
...
...
Really, Skeen, it's not a matter of code. I am using ADODC, where you get a neat GUI for everything. The only hitch is I am not able to connect to an SQL database, but able to connect to Access.
The specific issue that I want to know is is there some kind of security goof-up between NT and SQL?
rkoch3
Nov 20th, 2000, 11:14 AM
We need more info:
What is exactly the error message when you try to connect?
I have dial-up with my client's site using unbound data controls... no problems except that it's SLOWW..
ADODC...yeech!
honeybee
Nov 20th, 2000, 06:15 PM
There IS no error info.
From the ADODC properties when I go for building the connection string, I select the option saying 'Use NT security' and try to connect. It is supposed to show a list of all SQL databases on the server then, which it does not show. The drop-down is just plain blank.
The same thing happens if I turn off NT Security and use SQL Server security.
Both times I have tried with the Admin passwords for Win NT and SQL Server.
The same control picks up an Access database on the server correctly.
rkoch3
Nov 20th, 2000, 08:00 PM
Ahh ...
You'll probably better off building a connection string and use that instead of trying to build it every time through the UI.
ADODC is notorious for giving you a lot more trouble than it's worth. Go with UNbound data controls if possible and use Connection Strings.
honeybee
Nov 20th, 2000, 08:49 PM
But then the entire point behind using ADODC is to get the connection string!!!!
I am too lazy to figure out the various parameters of the connection string. So normally in my ADO projects, I put an ADODC on the form, connect it, test the connection and then copy the connection string into my code.
Still, my question remains unanswered: Why does it not work with SQL Server?
I have used ADODC and ADO objects to connect successfully to an Oracle Database on an NT server. Why does it not work with SQL Server?
Skeen
Nov 21st, 2000, 02:11 AM
rkoch3 is right,
Try this connecttion string:
Set cnOBJECT = CreateObject ( "ADODB.Connection" )
cnOBJECT .ConnectionString = "Provider=MSDASQL;DSN=CustServ;UID=CustServ_owner;PWD=CustServ_owner;"
cnOBJECT.open
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.