Sunday, March 11, 2012

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,

No comments:

Post a Comment