Yhello,如果你還在你的項目說不上來,但我要告訴你一個解決方案。
從您的網站(MSDN),在這裏我找到了什麼:
首先,查詢數據庫,因爲這是要更新的對象。然後,根據需要修改對象。最後,調用SubmitChanges方法將更改保存到本地數據庫。
所以,你需要查詢您的數據庫(例如,從我自己的VB.net代碼)
Dim monContact = From contact As Authentification In bddGLI.TableAuth Select contact
執行查詢並收集
Dim resultCollection = New ObservableCollection(Of Authentification)(monContact)
貫穿在得到結果此集合與ForEach循環並修改您的對象
For Each elem As Authentification In resultCollection
elem.Mail = txtEmail.Text
elem.Nom = txtNom.Text
elem.Prenom = txtPrenom.Text
Next
別忘了保存你的分區
bddGLI.SubmitChanges()
現在,如何檢查你是否真的更新了你的數據? 當我創建我的數據庫,我插入一些數據測試在我的表
Using db As New GeoLiveInfoDataContext(GeoLiveInfoDataContext.DBConnectionString)
If db.DatabaseExists() = False Then
db.CreateDatabase()
Dim contact As New Authentification
With contact
.Nom = ""
.Prenom = ""
.Mail = ""
End With
db.TableAuth.InsertOnSubmit(contact)
db.SubmitChanges()
End If
End Using
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286408(v=vs.105).aspx
轉到C:\ Program Files文件(x86)的\微軟的SDK \的Windows
電話\ 8.0 \工具\ IsolatedStorageExplorerTool
Shift +右CLIC =>打開提示這裏
ISETool.exe TS XD {ID APP這裏離清單} {PATH}
不要忘記在模擬器或設備(不調試)
安裝你的應用
Now在你的道路上,你有一個。sdf可以使用SQL Server Compact Edition打開。
更新前後執行此命令並檢查差異。