How to develop an application with ms-access-2016 and make it compatible with previous versions (2007) - vba

Am using MS Access 2016 to develop an application managing images. But some of my users are still using MS Access 2007 on their computers. And the receive the error "unrecognized database format".
So I would like to know if there is any solution for this. Like making my application compatible for previous versions.
I did some researches for days but not satisfied yet.
Need any help, solution or advice please. Thanks

Develop using the lowest version that your application will address, here 2007.
A newer version - 2010 and onwards - will run an older with no problems. However, 2007 is 32-bit only, thus - if you use API calls and some users run Access 64-bit - you must take care of that.

Related

How do you detect why Document.Open freezes when opening an RTF?

Context:
VBA macro embedded in an MS-Word document.
Old code running for 15+ years under Word 2003 without issue.
Upgraded to Word 2019
Existing/Previous RTFs open without issue
Upgraded server from "Windows Server 2008 R2 Standard" to "Windows Server 2016 Datacenter"
The troublesome RTF is a copy of another RTF that works without issue. No edits were made.
I make the call
On Error GoTo docerr
Set gobjDoc = Documents.Open(gstrTEMPLATE_PATH + gstrTEMPLATE_NAME)
docerr:
WriteLog ("ERROR Documents.Open: " & Str(err.Number) & "-" & err.Description)
where gstrTEMPLATE_PATH + gstrTEMPLATE_NAME provides a fully qualified path. I've logged this value it continues to be accurate.
For the new/copied RTF, the interpreter gets to the Documents.Open statement and never returns. No error is thrown.
Does anyone know why is doesn't return? Is there a way to force a return?
I added the parameter OpenAndRepair:=True with no effect.
FYI: This is my first question on this forum.
The Considerations for server-side Automation of Office article states the following:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
Microsoft strongly recommends that developers find alternatives to Automation of Office if they need to develop server-side solutions. Because of the limitations to Office's design, changes to Office configuration are not enough to resolve all issues. Microsoft strongly recommends a number of alternatives that do not require Office to be installed server-side, and that can perform most common tasks more efficiently and more quickly than Automation. Before you involve Office as a server-side component in your project, consider alternatives.
For example, the Open XML file formats are a public standard. See Welcome to the Open XML SDK 2.5 for Office for more information.
Also you may conside using any third-party components designed for the server-side execution, especially, for RTF files.

Send data to AS400 from VBA (runtime error 249)

I hope you can help me solving this problem
Every day a friend of mine has to fill the same field in AS400 using data that are stored in excel spreadsheet. I am pretty advanced programmer in VBA so I was wandering if there is a way to make vba and as400 interact
any ideas?
thank you very much in advance
EDIT:
in the meanwhile I am doing some digging and I found this
http://www.ibm.com/support/knowledgecenter/SSEQ5Y_5.9.0/com.ibm.pcomm.doc/books/html/host_access08.htm
Dim autECLConnList as Object
Dim Num as Long
Set autECLConnList = CreateObject("PCOMM.autECLConnList")
autECLConnList.Refresh
Num = autECLConnList.Count
but when I try to exectu the following code I get runtime error 249 saying that ActiveX Component couldn't create the object
If you want to load data directly to the tables, than the ODBC, OLEDB, or .NET driver would be the way to go. In fact, IBM provides functions to transfer data directly to/from Excel.
If you must load data through the existing screen, then you're on the right track. However, note that Personal Communications (PCOMM) is a stand-a-lone product different that the more prevalent Client Access (CA) product.
It's a bit confusing as CA includes a a subset of PCOMM as the CA emulator.
And there's two variants of CA
- older IBM i Access for Windows (originally Client Access (CA) for Windows)
- new Java based IBM i Access Client Solutions (ACS)
The older CA product included APIs for enabling workstation programs to interact with IBM i host systems. You'll need to install the Programmer's Toolkit component of IBM i Access for Windows. The toolkit is basically just documentation. Included in the toolkit is a link to some sample applications
Now the new ACS product is Java based. However IBM packages some windows specific components for ACS under the Windows Application Package. That apparently includes the aforementioned programmers toolkit.
I'm honestly not sure how that works given that the ACS emulator is Java based, instead based on the native windows PCOMM like the older emulator was.
You can do that with IBM Client Access ODBC Driver.
https://www-304.ibm.com/support/docview.wss?uid=swg21418043
Then use this connection string:
Driver={iSeries Access ODBC Driver};System=my_system_name;Uid=myUsername;
Pwd=myPassword;
As usual I found it here: https://www.connectionstrings.com/as-400/

Access by multiple users to access database

I am not very familiar with Access database till now i was only programming to SQL Server but now it's time to do so. I am building WinForms application which will be using Access database and i have some question related to that point if you don't mind. My application will be used by multiple users and there will be one access databsae. My questions as below:
Is there any problem with accessing access database in same time by many users or only one user can be connected?
If i develop my program to use access 2016 and some of my users will have diffrent windows version and also diffrent access version
will it works?
Should i know something else? :)
If your client want to have a file based database and this is a project constraint , MS Access is the best choice. If you want a more detailed advice, please let me know how many users will perform Read/Write or Read transactions, the size of the database and if the application will run in client-server mode in a LAN/WAN, Cloud or Remote Desktop environment.
Back to your questions:
Depending on these conditions you may range from 10 to 20/25 users. Remember that you can always try with MS Access and later upgrade to a MS SQL database in a couple of hours.
If your front-end application can link to a 2016 Access database, it will do that without installing MS Access to the clients that will run your App, i.e. the vb.net compiled App will install all needed drivers. If you develop your App within MS Access 2016 (Access Form and reports, some VBA) you can run it with the free runtime version of MS Access, but this only when no older version of Access is installed on the running workstation.
Please check with your client the real reasons for a file-based database...
To answer the questions as asked:
You might run into an issue with this, as access was really designed as a personal use database. Having anything more than a small handful of users hitting against it at once will in fact cause problems, as it's not really well designed for that purpose...
This should in theory be fine, as the application itself is interfacing with the database, not the end user...
It seems like you're taking a step backwards using access for this, and SQL might very well be better suited for this purpose. This isn't me trying to just bash access either, this comes from personal experience. Going with this sort of design is likely to cause you more headaches than good.

Office 2010 server side automation in a Windows HPC Server 2008 R2 Environment

I am aware of of the infamous Considerations for server-side Automation of Office from Microsoft and it clearly lists products from the 2010 suite.
However, today I was made to believe by an IT ops techie that Office 2010 does not suffer from the issues mentioned in that article and can be used without issues within a server environment. I have been unable to find any reference or supporting doc that would substantiate the claim. (I will follow up with him on this, however he must have been referring to some other server side technique) My gut tells me he was smoking his socks!
Is there an Microsoft based solution for server side automation for Office 2010? If yes, can you please provide a relevant link that supports the claim.
(I am not looking for a Spreadsheet Gear, OpenXML SDK, OpenXML etc. related answer)
If he's referring to automating the Office 2010 client on the server, he continues to be wrong. If he's referring to newly available functionality on the server that automates some Office document processing, he's right. It's likely he's referring to the later and has just skimmed some marketing material and came to a conclusion in his head that Office client can now be a headless automation server or some such thing.
Office 2010 on the server side came with a number of Application Services that work with SharePoint 2010 that significantly assist with server-side processing of some Office documents and functionality. In particular:
Word Automation Services
Excel Services
InfoPath Forms Services
and Visio Services
It would seem that the techie was not that far off and there actually was some validity to his claim. I refer you to Windows HPC Server 2008 R2 which deals with High Performance Computing (so this does not apply to your run of the mill type workbooks that I guess most people deal with) . This does make sense considering the company I am working at is with the insurance sector. Note: this only works for for a High Performance Computing server
I refer you to a Microsoft techincal whitepaper
Windows HPC Server 2008 R2 now enables running multiple instances of Excel 2010 in a Windows HPC cluster, where each instance is running an independent calculation or iteration of the same workbook with a different dataset. Many complex and long-running workbooks run iteratively—that is, they perform a single calculation many times over different sets of input data. These workbooks might include intensive mathematical calculations contained in multiple worksheets, or they might contain complex Microsoft Visual Basic for Applications (VBA) functions.
...
workbooks may need to be modified to work with this solution. When Excel 2010 runs on the server, it does not support user interaction. Windows HPC Server 2008 R2 includes a comprehensive pop-up manager that can handle occasional dialog boxes and pop-up messages, but it is not designed to support interactive Excel 2010 features
There is also another doc: : Accelerating Excel 2010 with Windows HPC Server 2008 R2: Building VBA applications and workbooks for a Windows HPC Cluster which goes into detail as to how to building Excel solutions for a HPC server.
Your IT OPS techie should send you a link to any information that suggests this. You should then post the link here.
That way, we can try to get the link corrected. Office hasn't stopped being a COM-based desktop application. Do not attempt to automate it in a multithreaded (server) environment.
Your techie may be thinking of the fact that there are now web versions of some of the Office products.
I think everyone has proven your colleague has his wires crossed.
If the problem you are trying to solve is "how do I automate the generation of Word Documents?" then check out www.intelledox.com these guys have a .NET based Doc Gen engine which consumes data from anywhere, web service, XML etc to create documents.
They are then delivered somewhere like in an email, into an ECM system, SharePoint etc.
Means you can stand up an engine that creates standard letters and correspondence etc.

How to distiguish between MS Access Fullversion with Access Run-Time

My application is built to scan MS Access database in vb.net 2005.
Problem:
MS Access DB is opening when Access Run-Time (But no Full version of MS Access) is installed in the system as well. But showing error while scanning through our Tool.
Solution:
Need only Full version of MS Access.
Suggestion:
To Identify, whether the required application (like here we need MS Access Full version) is installed or not at the time of installing our Tool(Through MSI).
Is it possible to identify MS Access Full version with Run-Time while installing the Tool?
As per my knowledge it is possible to identify the application along with its version while installing.
Could anyone suggest me is it possible or not, if yes then please provide me some useful reference or links.
Thank you.
Since you are asking for an answer that tests during your install process, the simplest answer is to query the registry. Prior to Access 2007 there was a specific key for Access Run Time, but it seems that with 2007 you need to check the Installed Packages path of the Office registry hierarchy.
Here's the key for Access 2007 Runtime:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Common
\InstalledPackages\90120000-001C-0409-0000-0000000FF1CE
And here's the key for Access 2007:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Common\
InstalledPackages\90120000-0015-0409-0000-0000000FF1CE
If you later want to re-verify that the setup remains as you want/need it, then try this:
IF SysCmd(acSysCmdRuntime) = true THEN
...
END IF