I have an issue. I have an Access Project (currently in access 2007), and the project connection properties are set to point to a hosted SQL database on our network. Unfortunately we had to move the databasem and now I have to change the connection properties as well.
However, when I open the adp file, the first thing it does is try to connect to the old database. I never get prompted or anything, the screen just sits there, and the title bar eventually indicates "not responding".
Anyone know how I can get to the connection properties, since Access never gives me a chance to do so?
Have you tried keeping the shift key held down while the database is opening to prevent any start-up forms or macros from running? If that does not help, you can change all the connections from VBScript.
Related
we are using SSIS 2016 and with parameterize connections. Every time we open the solution the connection manager is trying to connect with the credentials available in the project.param , due to unavailability of the password and repeated trying the db user account is getting locked.
Looking for some inputs if there is any settings we could change for connection manager not to try to connect when the solution is opened.
Thanks for your time on this.
RR
If you change the project setting to work in Offline mode, you should be able to open the project without validation checks firing which should alleviate the ever-so-fun lockout policy. That might be a user solution file setting so each team member might need to set it.
A different approach is to leave the design time user value to a non existent account. The run-time will swap in the properly parameterized connection but any developer opening the packages won't lock anyone out.
I would like to find a way to let Access crash in such a way that when you re-open the database, you will get this popup message:
'The last time you opened "....accdb", it caused a serious error. Do you still want to open it?'
Reason for this that have to maintain a server with a lot of cronjobs that launch even more Access applications, and sometimes it happens that a crashed Access application cannot be launched anymore due to this popup which prevents opening the database until you click 'Yes'.
To test my solution (remove registry key HKCU\Software\Microsoft\Office\XX.0\Access\Resiliency\DisabledItems), I need to have an access database that crashes on request.
Is there a way to do this with a vba script?
Write a script that kills the running process.
Update: I ran a SQL connection test function in my VBA and it reads open from my main workstation, I ran the same connection script at the client workstation and Runtime crashed. I also checked to make sure it was using a 32-bit rather than 62-bit driver and that the credentials were identical to another station that does work.If I run a connection test Runtime crashes, if I try to only run the query it says the connection can't be found. Both attempted from the user computer.
I successfully opened an ODBC Unicode connection to the MySQL database from the client computer at System DSN level. When I open the Access Runtime file and try to use a form to query the database I receive the error: "ODBC--connection to 'servername' failed." I have tried numerous names including changing the case sensitivity. I verified that the TCPIP address I used was indeed to the host for this database, and that the name using ipconfig /all - was of the appropriate case sensitivity. I have not been able to figure out if it is an issue with Access vs. Runtime, but I can't really see that being the problem here. The name of the table is "tbl_panel," and it is definitely within the database I connected to with ODBC with that exact name. The user requirements for the connection I used has basically "Read-Only" privilege, but that is all it should need as I am only checking the data. Unless creating a recordset is beyond the scope of SELECT, SHOW VIEW, CREATE TEMP TABLES. Furthermore, the fact that it can't find the server itself tells me its probably not to do with my SQL/VBA coding. Hovering over the tbl_panel in the Navigation Pane of Access shows "ODBC;DSN='servername';;TABLE=tbl_panel".
Here is the SQL string for creating the record set (truncated for space since the statement itself works fine):
stSQL1 = "SELECT tbl_panel.PNL_SN_ID FROM tbl_panel " & _ etc.
Set qryList = dbsInspect.OpenRecordset(stSQL1)
This has me pretty stumped, and I am a rookie when it comes to ODBC, so if it is something obvious please be kind. I did do a lot of searching, but most ODBC queries return issues with the initial setting up of the Data Source, or opening the connection in code. Is that a possibly for what I have to do? Include an opening statement for the table in VBA so that Runtime knows what to do? I'm going to feel silly if that is what the problem likely is and I typed all this for nothing.
This ended up being a bit issue. Despite using the ODBC connection tool in Control Panel --> Administrative Tools. I needed a 32 bit connection. This is answered in another SO question.
HOWEVER, I will note that the only way I ended up getting an useful error message was by creating a backend. Then it displayed the error message in the linked question below:
Related Question on SO
Running Access 2010 on Citrix against a SQL Server 2008R2 backend. Occasionally my users will get an error reading:
The expression On Change you entered as the event property setting produced the following error: Overflow.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
* There may have been an error evaluating the function, event, or macro.
Once a user gets this error during a session, he will continue to get it until he logs out of the database front end. He can then immediately relaunch the Access front end and go do whatever it was he was attempting to do. The On Change portion will vary in event type (sometimes On Click, sometimes After Update, etc), and it will happen on different forms, but the fix is always to exit the DB then get back in and everything just works fine.
The more I learn, the more I'm starting to believe that it's got something to do with the Citrix enviornment that we're in, but I haven't been able to pin anything down.
I've seen the suggestions to copy the form, and to start with a new DB and import everything. I've done these and it hasn't really helped - i.e. this is random enough that I don't know if the frequency of issues decreased significantly after the change.
Does anyone have any additional suggestions of what I can do in my Access code?
Does anyone have any experience with this setup and have some Citrix or SQL Server tweaks that I might be able to pass along? (I don't know if our IT people will listen or try to work with me on it, but it's worth a shot.)
I'm frustrated with the randomness of this, and I hate telling my users there's nothing I can do about it, but at the moment, I'm completely stumped.
Thanks,
FreeMan
Edit - Additional details...
the users are running a compiled .accde
they are all running from a common .accde file
this is still happening for a few users to whom I have given their own personal copy to run
The goto fix for random weird stuff happening in Citrix is to disable hooking. Hooks get injected into every process running in a Citrix session, so they could be screwing up something in Access. You can configure registry entries to exclude Access from being hooked:
http://support.citrix.com/article/CTX107825
We have the problem, which I think should be easily resolvable, but just not sure how.
We have the Windows 2003 Server with the Classic ASP application on it. The MSAccess database is used for data storage.
The application is designed in the way that it has a lot of includes.
The .asp page may open the DB connection and close it in the end of the page. At the same time the include that is included on the page may have the same database open as well.
The problem is that on the second open we're getting an error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use
This is on our local configuration only - we don't own that project, but are helping customer to fix some items. Everything works just perfect on Customer side.
When we set the read-only access to the database this error is not shown.
So, it seems that the ADODB.Connection is opening the database in exclusive mode.
Anyone has any ideas how to fix that?
Thanks
Ok. The issue was resolved. As I was saying in the question - the resolution was VERY SIMPLE. Instead of setting the IUSR_* Write permission to MDB file only, it was necessary to set the Write permission to the whole folder where the MDB file is stored. Strange, because I don't see any additional files created (meaning, like .ldb file, which is created during an exclusive DB open). But, it works now!
As far as I remember from using Access in my first classic ASP days you can't have more than one connection opened in the same time pointing to the same physical .mdb file because once it's opened, it's locked. That's what I learned the hard way.
The solution for me was using one single Connection. Having very small website to manage, I just used Application level connection object, created and opened once in global.asa then used in all pages.
However this is not good for ordinary websites so you can write file called "database.asp" in there create and open the connection then include that file and use the connection object in your code, not forgetting to close it in the end of every page.
Hope this makes sense, I'll clarify if needed.