Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Sep 2003
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    passwords (2002)

    I am trying to import some data from an excel worksheet into another.The one I am trying to import is password protected. Is there a way when I import the data to include the password in the query? Thanks in advance

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: passwords (2002)

    You mean something like (change fielname and p[assword as appropriate

    <pre>workbooks.Open (filename:="c:Myfile.xls",password:="drowssap")</pre>


    Steve

  3. #3
    Lounger
    Join Date
    Sep 2003
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: passwords (2002)

    So juts that as A SQL statement instead of using the wizard ?

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: passwords (2002)

    No, this is a VB statement to open the a file with a password. I guess I misunderstood.

    Steve

  5. #5
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Trenton, Ontario
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: passwords (2002)

    Have you tried using MS Query instead of importing to get the info from the SQL database? With MS Query you enter the user name and password when you first set up the query and you don't have to worry about it again.

  6. #6
    Lounger
    Join Date
    Sep 2003
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: passwords (2002)

    Do I need to configure the data source first. When I go through the query the password check box is grayed out.

  7. #7
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Trenton, Ontario
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: passwords (2002)

    You click Data--Get External Data--New Database Query, then choose New Data Source ande click OK.
    You then give it a name. In the box below that you select the driver. We use Pervasive SQL and it comes with it's own unique driver. Choose the SQL driver right for you and click OK.
    The next screen will ask for the data path. You can browse to the .DAT file of your software or enter it (serverprogramfile.dat as an example) and you also enter your user name and password in this screen as well.
    The next time you wnat to get some data you click Data--New Database Query and select the the one that you just created, you won't have to worry about a password again. When you get this far the Query Wizard will guide you through the rest.
    You might also want to check for a Database Reference Guide for your software. The Query Wizard will give you the headings of the data that you choose to pull up , but some companies make their headings self explanitory while others make thier headings vague to say the least.
    Let me know if you get stuck.

  8. #8
    Lounger
    Join Date
    Sep 2003
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: passwords (2002)

    I was doing something close to that but I will follow your directions exactly. Thanks a lot for the help and i will let you know!

Posting Permissions

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