Results 1 to 5 of 5

Thread: [RESOLVED] [2005] OleDB Insert question- source Passoword

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    88

    Resolved [RESOLVED] [2005] OleDB Insert question- source Passoword

    I’m trying to use the Insert command to insert data from a table in one MS ACCESS DB to another MS ACCESS Database. The INSERT command works as long as there is not a password on the source ACCESS database. Is there a way to include the password for the source Database? I am using an OleDB connection.


    Code:
    strSQL = "INSERT INTO tbl_Headerinfo "
    strSQL = strSQL & "Select * From  tbl_Headerinfo in " & "'" & StrPath & "\" & SourceFileName & "'"

  2. #2
    Addicted Member
    Join Date
    Dec 2006
    Location
    London, England
    Posts
    142

    Re: [2005] OleDB Insert question- source Passoword

    Check out this link. It should help you with the connection string needed

    http://www.connectionstrings.com/

    Redmo
    The universal aptitude for ineptitude makes any human accomplishment an incredible miracle -Col. John P. Stapp


    Please rate the posts that have helped. Makes us feel all warm and fuzzy

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] OleDB Insert question- source Passoword

    Please don't post the same question twice. One thread per topic and one topic per thread.

    http://www.vbforums.com/showthread.php?t=547162
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    88

    Re: [2005] OleDB Insert question- source Passoword

    redmo- this is not a connection string issue...

    Connection to the Target database is working. If there is NO password on the Source Database, the INSERT command works. What is needed is a way to include the password for the Source Database in the INSERT statement... or to find out if it can not be done, in which case I need to try something else.

    Jm- thanks for looking at the post in the Database section. Is there a way to included the password in the INSERT statement or am I at a dead end?

    thanks for your help.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] OleDB Insert question- source Passoword

    My guess is that there's some way to include connection details in the SQL code for the remote database, although I can't confirm that as I've never used multiple Access databases like that.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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