Showing posts with label device. Show all posts
Showing posts with label device. Show all posts

Sunday, March 11, 2012

Connecting to Database On windows 5.0 CE Device.

I'm a beginner in the Visual Studio Development for Mobile Devices.

I'm trying to develop a small program for a PSC Falcon handheld Scanner.

Particluars are

VS 2005 SP1

SQL Compact Edition

Windows CE 5.0

The test program is just a datagrid viewing data from the database

when the form loads with the following code:

Me.TblDetailsTableAdapter.Fill(Me.Test3DataSet.tblDetails)

trapping the error I get

Error Code: 8007000E

Message :

Minor Code:0

Source : SQL Server Compact Edition ADO.NET Data Provider

The interesting thing is that if I have the Database open in Query Analyzer 3.0.

The program works fine.

Maybe this is relevant: SqlCeCommand objects are not automatically disposed if you use a SqlCeDataAdapter object

http://support.microsoft.com/default.aspx/kb/824462

|||

Thanks for the timely response.

Being under a ending time schedule.

I went in a different direction to collect the scanned data.

Collecting in a Dataset and writing to a txt file.

I'll keep this in mind for future development.

connecting to database

Ilya Tumanov wrote:

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;

}


How would I connect to an access database through a web service? Or where would I find information about this?
[code]
Dim FHDB As New OleDb.OleDbConnection("connstr")
Dim daFoodDonor As New OleDb.OleDbDataAdapter("select * from FoodDonations", FHDB)
[/code]
Actually I think i have this figured out but now i have a new preoblem that does not makes sense to me.
In my project I added the webservice and make a call to is
[code]
Dim upload As New Access.Access()
upload.UpdateAccessData(DonorChanges, AgencyChanges)
[/code]
but it tells me that DeviceApplication1.FHHDBDataSet.DonorInformationDataTable cannot be converted to type DeviceApplication1.Access.FHHDBDataSet.DonorInformationDataTable
I dont understand why not they are both the same type, only difference is the '.Access' in there.Sounds like this is a access db issue. You probably want o ask around in access forum. Thx,