Results 1 to 10 of 10

Thread: Valid paths for .mdb & Internet Explorer

  1. #1

    Thread Starter
    Addicted Member J@ck's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    179

    Question Valid paths for .mdb & Internet Explorer

    Wotcha, folks.

    In my small office, we have 4x PCs networked up via the electrical supply and dLan plugs. We also have a stand-alone harddrive that we use as our network drive. This is mapped to Z:

    On this drive we have a .mdb file in the root directory and a VB database appilcation that links to it in another (but on the same drive).

    On all of the PCs, we have a shortcut to the database. However, when they are first switched on, if the shortcut is clicked on immediately, the following warning pops up.



    On clicking Okay, the database will load up, but only the skeleton form. There's no data or connection to the .mdb file.

    To rectify this, all we have to do is open Internet Explorer and close it immediately. The database loads fine after that. Our Internet Explorers have a homepage set to a .htm file also on the root of Z: (would this make a diff?).

    My question is - am I missing an integral part of the VB executable that, for some reason, IE provides, or is the problem to do with the drive mapping?

    How do I get the Database just to start up without having to load IE first?

    Hope I've made the above clear - I do tend to waffle.

    Many thanks,

    Jack.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    11,044

    Re: Valid paths for .mdb & Internet Explorer

    It's quite confusing, you said you have a VB database application, I think you have a Exe made in VB6.0 as your front-end right? Why do you need to have a shortcut to the database still? When you open your application can it connect to your database?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Addicted Member J@ck's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    179

    Re: Valid paths for .mdb & Internet Explorer

    Thanks for replying Dee-u.

    Everyone has the network drive on their desktop, but they also have a shortcut to the vb.exe on their desktop, which resides on the networked drive.

    When you open your application can it connect to your database?
    No, not without loading IE first !

    Jack.

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    11,044

    Re: Valid paths for .mdb & Internet Explorer

    Not quite sure what's wrong but how about installing your VB exe in those pc's? How is it connected to the database? Care to post your connectionstring?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Addicted Member J@ck's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    179

    Re: Valid paths for .mdb & Internet Explorer

    The vb.exe is a single executable that resides on the network drive (doesn't seem a problem when all 4 PCs could execute the same file).

    The .mdb is 1 folder higher than the vb executable.

    My connection string is this.

    Set cn = New ADODB.Connection
    cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=z:\JobBook.mdb;"
    cn.Open

    Jack.

  6. #6
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Valid paths for .mdb & Internet Explorer

    Instead of using Z:\, you could put the MDB in the same folder as the EXE and then use this connection string
    VB Code:
    1. cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\JobBook.mdb;"
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  7. #7

    Thread Starter
    Addicted Member J@ck's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    179

    Re: Valid paths for .mdb & Internet Explorer

    I could do that I suppose. Is there a reason why I shouldn't get exactly the same error message as before though?

    The existing path works absolutely fine, only when IE is run first!

    Jack.

  8. #8
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Valid paths for .mdb & Internet Explorer

    The reason why you will not get the same error message is that if a User is able to execute the EXE that means he will have access to the folder where EXE is present and if your MDB is also present in the same folder then the user will not have to do anything extra to connect to the MDB.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  9. #9

    Thread Starter
    Addicted Member J@ck's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    179

    Re: Valid paths for .mdb & Internet Explorer

    Hmm - that makes a certain sort of sense.

    I'll try that on our next reboot. I'll report back what happens.

    Much ta.

    Jack.

  10. #10
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Valid paths for .mdb & Internet Explorer

    All the best
    Use [code] source code here[/code] tags when you post source code.

    My Articles

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