-
Apr 27th, 2006, 03:03 AM
#1
Thread Starter
Addicted Member
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.
-
Apr 27th, 2006, 04:13 AM
#2
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?
-
Apr 27th, 2006, 04:24 AM
#3
Thread Starter
Addicted Member
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.
-
Apr 27th, 2006, 04:28 AM
#4
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?
-
Apr 27th, 2006, 05:45 AM
#5
Thread Starter
Addicted Member
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.
-
Apr 27th, 2006, 05:52 AM
#6
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:
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
-
Apr 27th, 2006, 05:57 AM
#7
Thread Starter
Addicted Member
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.
-
Apr 27th, 2006, 06:16 AM
#8
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
-
Apr 27th, 2006, 06:47 AM
#9
Thread Starter
Addicted Member
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.
-
Apr 27th, 2006, 07:29 AM
#10
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|