|
-
Nov 17th, 2000, 09:40 PM
#1
Thread Starter
Randalf the Red
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?
-
Nov 20th, 2000, 02:50 AM
#2
Thread Starter
Randalf the Red
Well ...
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.
-
Nov 20th, 2000, 05:06 AM
#3
Addicted Member
Have you set up the ODBC driver?
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
-
Nov 20th, 2000, 10:52 AM
#4
Thread Starter
Randalf the Red
Well ...
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.
-
Nov 20th, 2000, 10:54 AM
#5
Addicted Member
Post some code, connection string etc
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
-
Nov 20th, 2000, 11:55 AM
#6
Thread Starter
Randalf the Red
Well ...
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?
-
Nov 20th, 2000, 12:14 PM
#7
New Member
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!
-
Nov 20th, 2000, 07:15 PM
#8
Thread Starter
Randalf the Red
Well ...
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.
-
Nov 20th, 2000, 09:00 PM
#9
New Member
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.
-
Nov 20th, 2000, 09:49 PM
#10
Thread Starter
Randalf the Red
Well ...
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?
-
Nov 21st, 2000, 03:11 AM
#11
Addicted Member
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
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|