How to access remote database with VB6 using ADO.NET?
2008-01-28 22:07:41 UTC
I'm using VB6.0 with MS Access 2003. My access database is in another machine. My user interface (i.e. form) in another machine. I want to store the data to from one machine to another machine. please help me
Three answers:
Skeptic
2008-01-28 22:14:19 UTC
You need to upgrade to VB.NET. You can get a free download of the development enviroment from the Microsoft site. Query:
"Microsoft Express Download"
VB6 will do, but it would use DCOM not ADO.NET. This same site will provide you access to SQL Express.
If you are stuck with these versions of VB and Access, then you should stick with COM. There's a lot documented about how to do this.
2008-01-28 22:21:28 UTC
I discuss this in detail in my book "ADO and ADO.NET Examples and Best Practices" (APress).
You need to have both systems on a local area network (LAN). Establish a share on the target drive or directory. On the client system (that does not contain the data file) open a connection using the OLE DB device driver for JET/Access as described at http://www.connectionstrings.com/?carrier=access. Understand that a JET database does not propagate the data from one system to another. The data remains on the host system. However, with ADO.NET 3.5 you can use Synchronization Services to keep two databases in sync. You might want to download my ebook on the Compact Edition (see www.betav.com fmi).
2016-10-15 15:37:41 UTC
the 1st answer years in the past replaced into 'confident', on account which you could basically use your get admission to to kit the applying and distribute it to shoppers. positive and neat. The shoppers, consisting of your self, could in no way regulate the database, purely the information it contained. yet you stored a replica pre-carry mutually, so it worked nicely. Then the respond replaced into 'no' on account which you have been next allowed to distribute the run time information of get admission to. regrettably by using a comfortable over sight, in the adventure that your shoppers already had get admission to onboard and those distribution information have been a different version, they forgot to envision and basically over wrote each and everything. it fairly is a mistake all of us could make, incredibly undemanding to make if MS ignore to objective their application earlier merchandising it to you. Now the respond you will see maximum many times informed over the internet is 'it won't be able to be finished anymore'. nicely those solutions are incorrect. it fairly is authentic which you won't be able to create the executable anymore nor are you able to over wright your shoppers put in get admission to runtime information. quite you have a lots extra user-friendly way. Make your get admission to information information a source on top of issues PanelAdministrative techniques information supplies. probably on your case a consumer DSN. the marriage for this to your VB code could no longer be a sweeter one. be conscious, Excel and get admission to will %. up each and all of the tips their want right away from the ODBC. or you could interface using your code. i think of it fairly is amazingly neat, the subject I had with it replaced into that i did no longer realize how lots of the artwork replaced into finished for you, so i replaced into attempting to apply code to do issues that have been outfitted in.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.