Sunday, March 25, 2012

Access database connection

I am running Visual Studios 2005 enterprise edition and I am creating a mobile application to keep track of some receipts. The problem I'm currently having is that even though I can connect to the MS Access Database with Server Explorer that I'll be aquiring data from; Everytime I attempt to use the Data Configuration Wizard to add a new data source that namely the database I get this error message:

The new connection uses a data provider that is not supported. (end of message)

There is no username or password necessary to access this database and it is an Access 2003 database.

Any help would be greatly appreciated.

Just to make sure...

You did change the Data Source to:

Microsoft Access Database File (OLE DB)

Which will use the following .NET Data Provider:

.NET Framework Data Provider for OLE DB

I assume you did in order to select the database, but I just want to make sure.

And when you click the button "Test Connection", it gives you that error?

Regards,

Dave

|||

Well that is the default settings so I just left those as they were and once I had figured out how to connect to the database thru server explorer, whenever I hit the test connection it said Connection ok. However the error message pops up when I attempt to add the database thru the add new datasource wizard.


|||Perhaps I'm missing something, but didn't you say this was a mobile app? Isn't the reason that VS is refusing to use the data source simply because the JET database engine doesn't run on mobile devices? -- Brendan Reynolds Access MVP wrote in message news:b986531d-b456-4194-af38-649f7db26f0d@.discussions.microsoft.com... >I am running Visual Studios 2005 enterprise edition and I am creating a
> mobile application to keep track of some receipts. The problem I'm
> currently having is that even though I can connect to the MS Access
> Database with Server Explorer that I'll be aquiring data from; Everytime
> I attempt to use the Data Configuration Wizard to add a new data source
> that namely the database I get this error message: >
> The new connection uses a data provider that is not supported. (end of
> message) >
> There is no username or password necessary to access this database and
> it is an Access 2003 database. >
> Any help would be greatly appreciated. >
>|||

To: Mr. Reynolds
I have no idea sir, I started the project as a smart device app, and in all the walkthroughs I have viewed nothing has been said about the Jet database engine being incompatible with mobile devices. If this is the case I'd like to know because this project is currently dependent on VS being able to connect with our Access database.


|||

I'm not sure of the limitations, you're best asking at the SQL Mobile Forum.

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=152&SiteID=1

Am moving this thread to there.

Here's some info on SQL Server 2005 Mobile Edition

http://msdn.microsoft.com/sql/mobile/default.aspx

Alex.

|||The JET database engine runs only on desktop and server versions of Windows. It's certainly possible to develop a mobile web app that talks to a JET database on the server, but if you need a local data store on the mobile device that will remain available when the device is not connected to the network, then you will not be able to use JET. Your alternatives - as I understand it - include SQL Server CE and XML. There is a database engine on the Pocket PC called 'Pocket Access' but it has very little to do with the desktop product, and there is no built-in support for 'Pocket Access' in the .NET framework. There is, however, a third-party component you could look at. There's an article on this at the URL below, and there's a link from the article to the vendor of the third-party component. Note that I haven't personally used this, and I don't know what plans, if any, Microsoft has to continue to support 'Pocket Access'. So this isn't a recommendation, just something that may be worth further investigation. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnroad/html/road10222003.asp There's an interesting article on 'Data Access Strategies for the Microsoft ..NET Compact Framework' at the following URL. Although the article dates back to the .NET 1.0 timeframe, I believe it is still relevant. http://msdn.microsoft.com/mobility/understanding/articles/default.aspx?pull=/library/en-us/dnnetcomp/html/dataaccessstrategy.asp -- Brendan Reynolds Access MVP wrote in message news:703e94a5-811d-4486-927c-34c62b34dc36_WBRev1_@.discussions.microsoft.com...
> This post has been edited either by the author or a moderator in the
> Microsoft Forums: http://forums.microsoft.com
> To: Mr. Reynolds
> I have no idea sir, I started the project as a smart device app, and in
> all the walkthroughs I have viewed nothing has been said about the Jet
> database engine being incompatible with mobile devices. If this is the
> case I'd like to know because this project is currently dependent on VS
> being able to connect with our Access database. > > > >
>|||Thank you for the information. Unfortunately I have a follow up question. If I were to make an intermediate SQL database to function as the go between for a SQL Mobile database and a Microsoft access database, is such a solution even possible? Our organization recently purchased VS 2005 on the assumption that it would be easy to use the .NET framework to develop a mobile app that would easily transfer data to an access database. Now with this new information its quite possible the data will go SQL Mobile -> SQL Database -> MS Access database.
Footnote:
The SQL Database would just function as a temporary store to check data generated from receipts made in the mobile database. Once the checks are done the corrected data would be passed to the MS Access database. Then the SQL database would wipe itself clean.
|||

Yes, but it makes no sense. To accomplish that you would have to purchase SQL 2000/2005 and pay CALs per device (or per CPU license). If that’s acceptable, simply get rid of Access and use much more powerful SQL you've paid for.

Alternative solution is to use Web Service to talk to Access database. Create couple WEB methods to talk to access and call them from device. Something like this should do:

DataSet GetAccessData(String command, …)

{

// Connect to Access DB here, execute command and populate data set with returned data.

return dataSet;

}

Bool UpdateAccessData(DataSet dataSet, … )

{

// Connect to Access DB here and update DB with data from Data Set.

return success;

}

|||To: Ilya
The enterprise edition that we purchased of VBS 2005 came with SQL server 2005 and I just installed it upon learning that I can't communicate directly with the Access database. I'm not sure if we still have to pay the CALS per device though.
If I used these web service methods where would I write them? In the upload and download portion of the code for the mobile app?
|||

I believe it comes with 5 CALs (to be verified).

These WS methods would run on desktop via IIS which would host WS. To create them, please click ‘Create/Web Site’ and choose "ASP.Net Web Service". You'll get project skeleton, simply add code you need and run it. Decorate added methods with WebMethod attribute. This is desktop project, so you could use anything desktop has to offer.

Calling WS from device pretty much looks like a normal function call. All necessary code would be created for you automatically as soon as you add Web Reference to your project.

|||i want to connecting Access database on PDA ?
i am setting Access database on PDA..
can i do ?
and how i doing?|||How would one connect to an access database inside the web method?
|||

while the .NET Compact Framework has no APIs to leverage Access databases, there is an open source set of APIs that support Access at www.opennetcf.org

there are also some commercial libraries available - use Google Advanced Groups search on microsoft.public.dotnet.framework.compactframework and look for "Access Database"

Darren

No comments:

Post a Comment