Is that file path correct? Wouldn’t it be a single backslash if it’s in the root directory on E? I could see it translating the direction but would it deal with double slashes?
As @droopsnoot has mentioned change your path string to only contain one backslash. I would also check the read/write permissions to the E:/ directory as you may not have access to the directory.
I don’t know how you’d do that - if it is possible, I would imagine it would mean sharing the database file on your PC with the hosted server by opening it up as a share, and configuring that to be able to access your PC. Sounds like a security hole to me, though it might not be. Your Internet connection will almost certainly require a static IP address, do you have one? If it keeps changing you might get away with configuring some kind of Dynamic DNS service to keep it working.
The database file is of desktop accounting software and is in microsoft access format
i want it to sync that file with my online database through php
means i want
when i update prices in the microsoft access format file then i want to my online database to get updated or vice versa
But this microsoft access database file exists in the computer hard drive. its not online.
Can it be done with Setting DSN connection with ODBC on the computer and then querying it through php online ?? any idea if this is possible or not ??
You would need a desktop application to interface with your online application. So to give you an overview of how those type of applications work and how to go about building one. So you will need to write a desktop application for what OS’s you plan to support. Lets say you wanna support windows only you can then use a language like C# and write a console or GUI(graphical user interface) but c# is not the only language as many can write desktop applications. But C# is easy and works well on windows since its microsoft language. But this desktop app will need to then connect to your access database. So their is a few ways you can manage the data changing such as update fields or querys that check the data against another table or database against another database or export and import. There are many ways you can accomplish the data changing event. But once you have the data that is change you will need to send it to the server. This will need to be done through a restful api that can receive the requests sent from your desktop application.
So things you will also need to manage is making sure there is an internet connection and what to do if there is not with the data that was chnaged as well as prevent the application from erroring out when there is no internet.
Also there is security concerns for the data being sent through the request so you will need to encryt the data and also since it could be sensitive data you mind want to think about authentication so data cannot just be sent in and out with out proper authorization. So now you need to decide if the application user needs to login or will it be a static or dynamic based system as this part can become rather tricky and complex depending on your needs.
There is far more into it but as you can see it sounds simple in your head but the reality of it is these projects are icebergs.
The problem you have is that the PHP server at your hosting company needs to connect in to your desktop PC in order to be able to access it. That means two things - you have to open up your PC to accept an incoming connection into your accounting database, and you have to have some way the PHP server can find your desktop PC. The first sounds like quite a security hole, the second means you’ll either have to have a static IP address on your internet connection, or use a dynamic DNS service.
Can’t you move the accounting access file to your web host, and configure your desktop application to use it there? Your hosting company might not be prepared to configure it - if they’re not, there may be a good reason that an incoming connection to an Access database isn’t a good idea. If they will, the down side is you won’t be able to use your accounting system when the net connection is down.
If the data you want to sync is limited to things like prices, a definable list of fields, then the best way you can do it is to write an import and an export routine on both ends so you can transfer the required data. You could write code to transport any changes from each end to the other, but that’s database replication, a complicated thing to configure and use, never mind write, and your database format might not make it possible.
So possibly the easiest way is a bit of code to export updated prices from Access and upload it to the host, and an import routine on there, and the opposite way to move stuff from the host to the internal copy.
Using your home computer as an online server has so many complications and potential pitfalls it’s essentially a no starter.
Likewise, having two versions of the same database both that can change at any given time in sync can be a huge problem.
Unless you are willing to maintain multiple servers with fall back in place and hire personnel to keep things running you will have problems.
This is why the typical approach is to have only a single live database (not counting the backup files) and work with that.
I’m guessing the online database would be the more active and that your computers database would have only infrequent changes after it is initially populated.
So it makes sense to me for you to do any CRUD (Create, Read, Update and Delete) online and avoid the need to do any complicated network or syncing operations.
IMHO if you are wanting to do this to save money by not getting an online database host you are grossly underrating the value of your time.
I guess you might be able to migrate an Access database to a MySQL database. But that is likely to be a lot more work and have more problems than having an Access database server.
Exactly why the typical approach is to work with the online database. Then you only need to download backup files.
The lowest hurdle is not doing networking and syncing, the lowest hurdle is getting the accounting software database online so you can work with it online.