Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hta database access error 1

Status
Not open for further replies.

bn2hunt

MIS
May 15, 2003
203
0
0
US


I am trying to use an access database stored on a remote server in an hta page. But I am getting an error message "This Website uses a data provider that may be unsafe. If you trust this website, click OK, otherwise click Cancel.

Now I have two questions.

1: How else do I access this database from an HTA page to not get this message?

2: Can multiple people access the database at the same time?

Thanks for the help

Dan




Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")

dbname = network location

'** problem line below
objConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " & dbname



bn2hunt

"Born to hunt forced to work
 
I'm having the same problem. The only answers I've found so far are:

1) Copy the HTA to the local computer (eg: C: drive) and execute it from there. Apparently, when it's anywhere but local, this message will appear.

2) Export the code which causes the problem to an OCX file and use that from inside the HTA.
 
the database doesn't have to be on a local computer. i have hta apps that accesses databases on a network drive. i'm not sure about "another" network, though. if you have authorization to access the database on that network, should it not work?
 
jfdabiri,
The HTA works fine regardless of where it's stored. It's just that if it's not saved on the local PC, the above warning pops up before the program will execute. We'd like to get rid of this warning, as it's a nuisance, but the HTA works fine either way.
 
try this:
by adding the form library URL as a

'trusted site' with Internet Explorer.

To do this:

Goto Tools > Internet Options (Internet Explorer)

Then open the 'Security' tab. Click on the icon of 'Trusted Sites' and

then click the button 'Sites'.

Now simply add your form library URL as a trusted site and click 'OK'.

Now the annoying prompt should disappear!
 
jfdabiri,
That did the trick for IE6. Thanks. This will work for the vast majority of my team.

However, I have 2 PC's, one with IE7, which doesn't seem to let me register the intranet site properly. When I enter in \\server\share as the site to register, it truncates it to file://server and now I get a "The publisher could not be verified." warning. However, even if I select 'Run', I get an error (not a warning) indicating "Safety settings on this computer prohibit accessing a data source on another domain." I don't get this error on my machine with IE6, and if I take out the entry from the Trusted Sites, it goes back to the original warning but works fine. Any ideas? Is this just perhaps an IE7 oddity?
 
Is this just perhaps an IE7 oddity
Don't let IE7 guess itself the intranet zone:
menu Tools -> Internet options -> Security tab
local intranet icon
sites button
untic the automatic checkbox

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,
Deselecting the 'automatic' checkbox as described solves the error issue, but the warning that previously appeared is back. Have I missed something? The HTA is on a network share (eg: \\server\share\path\HTAfilename.hta and not a website, etc).
 
A possible workaround is to use a mapped drive instead of an UNc.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,
I get the same result using a mapped drive as a UNC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top