+ Reply to Thread
Results 1 to 2 of 2

Thread: Getting data from SQL

  1. #1
    snook@accelis.net
    Guest

    Getting data from SQL

    Hi,

    I am trying to build a workbook with data from SQL. I need to prompt
    the user for the SQL server, login and pwd (its in mixed mode)
    everytime the workbook is opened.

    I am new to this and I have explored the following options:

    Building a login form and ADO recordsets

    Using SQL.Request()

    Our users are on various versions of Excel (all 2000+) so I want to
    make sure it works for everyone.

    thanks


  2. #2
    AA2e72E
    Guest

    RE: Getting data from SQL

    Try this:

    1. Create your ADO connection object.
    2. Set its Properties.Prompt.Value = 1 ' adPromptAlways
    3. Open your Connection object

    An appropriate form will open up asking for the relevant/missing information.

    Sub aa()
    Set adoc = CreateObject("ADODB.Connection")
    adoc.Properties("Prompt").Value = 1
    adoc.Open
    End Sub




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0