I am migrating a website over to a new server, its in ASP and uses several Access databases, the site and CMS can read, display the data, and even edit and update existing data entries, but when I want to add a new entry, I get an error...
Microsoft VBScript runtime error '800a0046'
Permission denied: 'CreateObject'
/padp2010d/ads_tradetracker.asp, line 11
There seems to be no passwords on the databases, I have set up and tested the ODBC Data Sources and they are working fine.
The code or line that is causing the problem is...
<%
Dim Mail, strPath, strHost, Upload
Set Upload = CreateObject("Persits.Upload")
Upload.IgnoreNoPost = True
' Generate unique names
Upload.OverwriteFiles = False
' Limit file size to 500000 bytes
Upload.SetMaxSize 500000, True
' capture an upload and save uploaded files (if any) in temp directory
Upload.SaveVirtual "\pa\images\advertenties"
Upload.Save
' Use session ID as the new file name
NewName = Session.SessionID
The line 11 is Set Upload = CreateObject("Persits.Upload")
If anyone could help that would be great. Could it be a Permission setting?
Im a complete novice with ASP and Access!
Thanks
I have tried the answer below but I still get an error...
Server object error ASP 0178 : 80070005
Server.CreateObject Access Error
/padp2010d/ads_tradetracker.asp, line 11
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
How about:
Server.CreateObject("Persits.Upload")
Try CreateObject("Persits.Upload", "localhost") instead. I've found that in some scenarios the optional argument is required, but have never figured out a pattern as to when.
I have now solved the problem, the script works fine, the problem was permission settings on AspUpload component on the server. Many Thanks for your help.
Related
I am connecting to an Azure Server to import data hosted by a 3rd party. I can not use Windows Authentication to connect due to security protocols between their company and mine. I have to use server-side authentication with a username and password. I am connecting to Azure using OBDC through DSN. The problem is each time I open Access and connect to the Azure tables, I get a connection error that I have to correct by manually unchecking "Use Trusted Connection" then entering that server's username and password. Is there a way to automate that process?
There are two approaches you can use to fix this issue.
One way, is to delete all your table links, and then re-link. Just make sure you check the box to save the uid/password when you do this. As a result, Access will remember the settings for the lined tables. However, if you “often” or “always” need to prompt the user for uid/logon, then you have to re-link the tables each time. However, if you not needing to re-link or change the uid/password, then this is a simple and fine solution.
Just keep in mind that your uid/password is in “plain” sight the linked tables – so only you can decide if this is a “non issue”, or something that you want to prevent users from seeing.
The other approach is to “leave” your lined tables as they are, and execute a logon in your startup code. Once you executed a logon, then your existing linked tables (without the uid/password saved) will now work.
You can use the following code to “log on” to the server, and once done, then all of those prompts should not appear.
Function TestLogin(strCon As String) As Boolean
On Error GoTo TestError
Dim dbs As DAO.Database
Dim qdf As DAO.QueryDef
Set dbs = CurrentDb()
Set qdf = dbs.CreateQueryDef("")
qdf.connect = strCon
qdf.ReturnsRecords = False
'Any VALID SQL statement that runs on server will work below.
' this does assume user has enough rights to query built in
' system tables
qdf.sql = "SELECT 1 "
qdf.Execute
TestLogin = True
Exit Function
TestError:
TestLogin = False
Exit Function
End Function
You have to pass the above a correctly formatted connection string.
I will try the "log on" technique and let you know how it goes. To give a little more background, I am linked into several backend databases. The ones on on the companyserver auto login using Windows Authentication. The tables on a third party developer's server can not be linked with Windos Authentication due to security issues that poses. The third party connections have to use the developer's login and password.
We have referred to this MSDN article for help on locking down the hardware buttons on our device.
The article is pretty straightforward and I managed to generate a prov.xml file with the help of our manufacture however when we try and upload our app to the Windows Store we get the following error:
Package acceptance validation error: File WindowsPhoneReservedAppInfo.xml is invalid: The 'Id' attribute is invalid - The value 'ID_CAP_ENTERPRISE_SHARED_DATA' is invalid according to its datatype 'http://schemas.microsoft.com/phone/2013/windowsphonereservedappinfo:ST_SoftwareCapability' - The Enumeration constraint failed.
I would have thought we would be required to include the WindowsPhoneReservedAppInfo.xml as described in the article above so that when we download the app we can lockdown the hardware buttons.
It's worth noting that if you don't have this file and attempt to lockdown you get the following error:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
For anyone interested in the code that does the lockdown here it is (although the code works I just thought I would try and give a bit of context):
Dim _GUID As Guid = Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetCurrentLockdownProfile()
If Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetLockdownProfileInformation(_GUID).Name <> "Associate" Then
For Each G As Guid In Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetSupportedLockdownProfiles()
If (Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetLockdownProfileInformation(G).Name.Equals("Associate", StringComparison.CurrentCultureIgnoreCase)) Then
Await Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.ApplyLockdownProfileAsync(G)
End If
Next
End If
Catch ex As Exception
End Try
We use the role Associate in the prov.xml file. The prov.xml file does lockdown the device as we want it too and that only works if we have the WindowsPhoneReservedAppInfo.xml file as described in the MSDN article so I can't understand why we can't upload to the Windows Store.
Does anyone have any ideas on how I should be uploading our app to the Windows Store?
I've spoken with our manufacturer and they have said this:
I have a strong feeling this cannot be used in a store app due to Microsoft rules…. So it looks like you can only use this in an Enterprise signed application (Which you then side load onto the device or download using a MDM).
That being the case I will have to look into MDM.
Since I put a code AllowBypassKey = false in my program
If I run my code in Access Runtime 2010, automatically gives an Runtime Error and closes my program for no reason. :(
==================
What I did is :
-The first form will show in the program is the LoginForm
-On Load LoginForm
CurrentDB.Properties("AllowBypassKey") = false
-On Click Quit Button in the LoginForm.
If txtpassword = strByPassCode then CurrentDB.Properties("AllowBypassKey") = True
====================
Im not really sure whats happening with my program
but If I run my program in Full Version Ms Access 2010
I didn't encounter any errors with my codes.
But if I remove the AllowByPassKey it will run smoothly. But I need to put
a ByPass Code so that my codes will be protected and also the tables.
I already solve my problem. It was a data problem
from the clients database. I was so d**b I didn't copy
his database.
Thanks for the help :)
I support a LOB application written in MS Access VBA with a SQL Server back end. One feature of the application is the ability to open a second instance of the application, allowing the users to view/modify two records at the same time.
The first time I open the application it connects and everything works fine. However when I attempt to open the second instance I get the following error message:
-2147467259 - Method "OpenConnection" of object _CurrentProject failed.
This is the line of code executing when the error occurs:
CurrentProject.OpenConnection strConnection
I have stepped through the code and verified that strConnection is the same connection string in both the first and second instances of the application
I'm running out of things to look for. Any ideas are greatly appreciated!
UPDATE: It appears that something is not allowing the second MSACCESS.EXE instance to use the same connection string. My connection string is below, with database and server substituted for the actual database and server.
PROVIDER=SQLOLEDB.1;INTEGRATED SECURITY=SSPI;PERSIST SECURITY INFO=FALSE;INITIAL CATALOG=database;DATA SOURCE=server
Try
MultipleActiveResultSets=True
(http://msdn.microsoft.com/en-us/library/h32h3abf(v=vs.110).aspx)
Would it be better to open a new form from the same application?
dim frm as ShowCar_Form
frm.Show
Some users get the following error when running reports.
• Execution 'iwy2vpzo52pmp555ftfn4455' cannot be found (rsExecutionNotFound)
They run fine in the morning.
Any suggestions?
Thank you
I can help.
The problem is that the ReportViewer control uses Session to store the currently executing report. Once you navigate away from the reports, the item still remains and eventually loses its "execution context", which is the way Report Server caches reports.
Therefore, before browsing a report, you should attempt to clear out the Session of these reports, so that there are NO cached reports in the Session, and the ReportViewer control can work properly.
You will also find that sometimes when accessing Session.Keys.Count, this error can occur, as again, the execution context has failed.
Make sure you do this on the page showing the report!!
The 2 options are:
if (!IsPostBack)
{
HttpContext.Current.Session.Clear();
ReportViewer1.ServerReport.ReportServerUrl = new Uri(ReportServerUrl, System.UriKind.Absolute);
ReportViewer1.ServerReport.ReportPath = ReportPath;
System.Collections.Generic.List<ReportParameter> parameters = new System.Collections.Generic.List<ReportParameter>();
....
ReportViewer1.ServerReport.SetParameters(parameters);
ReportViewer1.ServerReport.Refresh();
}
Or
for (int i = 0; i < HttpContext.Current.Session.Keys.Count; )
{
if (HttpContext.Current.Session[i].ToString() == "Microsoft.Reporting.WebForms.ReportHierarchy")
HttpContext.Current.Session.RemoveAt(i);
else
i++;
}
I am using SSRS 2017 and was running into this issue when trying to load a report into my MVC project using URL Access. The issue for me had to do with session.
To check this for yourself, you can try deleting the RSExecutionSession cookie and reload your report. Unfortunately, this is only a temporarily fix.
If this does work, try adding rs:ClearSession=true to your query string.
You can read about this setting here.
Look for a trailing space on the report path. This was the cause for me.
On the web.config's impersonation, use identity
impersonate="true"
userName="xxxxx"
password="xxxxx"
instead of : !--<identity impersonate="true"
Hope it helps
If you're running SQL Server Express edition, the SQL Server Agent isn't running to clean up your old SSRS sessions. You'll need to run a job on SSRS DB to clean up the old sessions.
My report took 10 seconds to run and 2 seconds to export - so it wasn't to do with the session expiry length.
I'd get the error when exporting a report to excel into my app an hour after I exported the report.
This error was causing my application to display a run time error.
I added this to the Global.asax class to resolve the error. Tried Server.Clear but got nothing. Session.Clear got rid of the error completely.
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
If ex.InnerException IsNot Nothing Then
If ex.InnerException.ToString.Contains("The report execution") AndAlso
ex.InnerException.ToString.Contains("rsExecutionNotFound") Then
Session.Clear()
Return
End If
End If
End Sub
While it may not be 100% applicable to the question above, I haven't been able to find any other resolution.