Results 1 to 11 of 11

Thread: Dialup connection to SQL Server

  1. #1

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345
    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?

    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  2. #2

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Talking

    Have you set up the ODBC driver?
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

  4. #4

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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.

    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  5. #5
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Talking

    Post some code, connection string etc
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

  6. #6

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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?

    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  7. #7
    New Member
    Join Date
    Nov 2000
    Location
    SF, CA
    Posts
    3
    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!

  8. #8

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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.

    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  9. #9
    New Member
    Join Date
    Nov 2000
    Location
    SF, CA
    Posts
    3
    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.

  10. #10

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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?

    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  11. #11
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Talking

    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
  •  



Click Here to Expand Forum to Full Width