i want to sync the local db and server , if any data updated in server it should sync with android local db.
i have read the tutorial for syncAdapter from this link
but above link content provider is used, could any one share the details about how to use the sync Adapter with sq-lite DB. or please suggest me any good examples
Refer to stub content provider and custom sync adapter. They have long text but very useful.
Related
We are trying to create custom blob using the sample provided by Sensenet on wiki http://wiki.sensenet.com/How_to_create_an_external_blob_provider ,
But we found there is an object not exist “FileSystemChunkReaderStream” so we are not able to continue practicing how to work with blobs.
Can you please share with us this class FileSystemChunkReaderStream ?
Currently the Reader and Writer stream classes can be found in the Tests project along with the file system blob provider sample. Although if you are using the Community edition, you'll have to wait a bit for the new release because it is behind the Enterprise edition.
In the meantime, please check the wiki link you posted above, I added the two missing stream classes to the article so that you can continue with your project.
How to create an external blob provider
I am developing a hybrid application which needs database connectivity to store and retrieve data.I am using IBM db2 database and worklight 6.1. I need the javascript code to connect to db2 so that I can enter information directly to the database from the apps UI and data from db2 should be displayed on the screen.(i.e.both side connectivity-->data retieval and storage in the database)
This is not specific to DB2.
What you really need to do is to read the SQL adapter training module, and learn how to send data to and retrieve data from - a database. Then you need to review the sample project provided in the same URL above.
You can also take a look at the following (after you read the training module). The concept is the same in nature, just for DB2...:
http://wpcertification.blogspot.co.il/2012/03/connecting-to-database-from-worklight.html
After I've done developing my web site using Hibernate and Struts2, now I want to put it on Cloudbees hoster, the problem is that I don't know how to create my data base's tables?!!
I used the method shown in this video to create my tables: http://vimeo.com/33445098 But it doesn't work!!
It shows how to connect to my server by using MySQL WorkBench, when I created new Server instance the connection couldn't be established, although I used the appropriate informations.
Thank very much :)
After days of looking around on the web I found this, it's very useful
http://www.youtube.com/watch?v=oWE6s_FQBwA
I'm working an OCA application based on a SQL server db and a SQL CE client db. Each user has there own table in the on the SQL server db. Each user's table has the same schema but can have different data. I'd like to make the synctable name to be dynamically set in the client application based on the their SQL server DB table name (which is set as userID + "__usersdatatable").
The sync service runs without problems when I don't attempt to change anything. My latest idea was to change SyncTable.TableName = "jsmith_usersdatatable"; in the LocalDataCache1SyncAgent.cs in the oninitialized() method. However, I get the following error:
"Unable to initialize the client database, because the schema for table 'zlentz_GOBOS'
could not be retrieved by the GetSchema() method of DbServerSyncProvider. Make sure
that you can establish a connection to the client database and that either the
SelectIncrementalInsertsCommand property or the SelectIncrementalUpdatesCommand
property of the SyncAdapter is specified correctly."
In short the idea is that each OCA will need to sync to a different table (bidirectional).
I'm obviously no SQL or sync Services expert so advice would helpful. :)
Thanks in advanced!
After learning more about the Sync Framework it was apparent that I needed to work outside the wizard.
For future viewers the following link was very helpful:
http://www.codeproject.com/Articles/18027/Take-Data-Offline-Using-Microsoft-Synchronization
How would one go about incorporating, for example a 'mailing list' where user could fill in a text field for 'name' and 'email address' and click a submit button that would add the data to a database on a remote server.
Property lists would be the most convenient but the whole plist would need to be downloaded to the users device, modified and reuploaded (which looks involved and easily corrupted). SQLite is likewise built for a local database. Is there a simple way to do this or is server side php scripting the only real answer?
I see a lot of replies about this question that specify a specific database type and programming solution. The real solution is a web service, of any kind, and a data store, of any kind.
This could be SQL Server with a web service written in ASP.NET. It could also just as easily be a MySQL database with an interface written in PHP. But for the love all things secure don't try to attach to a database directly.
It would appear the most practical method at this time is a remote MySQL (or similar) database queried from php scripts that are called from the app via NSURLRequests (. Information about the query can be sent using the _POST variable.