简体   繁体   English

如何使用Microsoft Sync Framework在客户端数据库中插入新行

[英]How to insert new row in client database using Microsoft Sync Framework

I followed the tutorial "Tutorial: Synchronizing SQL Server and SQL Server Compact" ( http://msdn.microsoft.com/en-us/library/ff928494.aspx ) everything worked fine. 我遵循了教程“教程:同步SQL Server和SQL Server Compact”( http://msdn.microsoft.com/en-us/library/ff928494.aspx ),一切正常。

After the last step, when I want to add an new row in the client database (dbf database file) I receive the following error "The number of columns in the query and the table must match. [ Number of columns in query = 3, Number of columns in table = 6]" 在最后一步之后,当我想在客户端数据库(dbf数据库文件)中添加新行时,出现以下错误“查询和表中的列数必须匹配。[查询中的列数= 3,表中的列数= 6]“

I know that the synk framework has inserted Sync columns at the end of the tables I want to edit on the client device, but do I have to manage these columns ? 我知道synk框架在要在客户端设备上编辑的表的末尾插入了Sync列,但是我是否必须管理这些列? And if yes, what must I exactely fill in these cols ? 如果是,我必须完全填写这些列吗?

Thank you in advance for your answer 预先感谢您的回答

JD Gasser JD加瑟

this has been answered in your other post in the MSDN forums ( link ) and the issue has nothing to do with Sync Fx (you will get the same error whether you use Sync fx or not) 这个问题已经在您在MSDN论坛上的其他帖子( 链接 )中得到了回答,并且此问题与Sync Fx无关(无论是否使用Sync fx,您都会收到相同的错误)

as advised, please make sure to specify the columns in your Insert statement (eg, insert into tablex(col1, col2, col3) values (col1value, col2value, col3value) 根据建议,请确保在您的Insert语句中指定列(例如,插入到tablex(col1,col2,col3)值(col1value,col2value,col3value)中

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用于文件(客户端)和SQL Server数据库(服务器)同步的Microsoft Sync Framework - Microsoft Sync Framework for File (Client) and SQL Server Database (Server) synchronization 如何使用Microsoft Sync Framework与过滤器数据同步 - how to sync with filter data using Microsoft Sync Framework 如何使用Microsoft Sync Framework同步Web服务器和本地服务器 - How to sync a web server and a local using Microsoft Sync Framework 如何使用Microsoft Sync Framework仅将新项目上载到服务器而不更新/删除现有项目 - How to upload only the new items to the server without updating/deleting the existing items using Microsoft Sync Framework 使用Microsoft Sync Framework自动创建客户端架构 - Automatically Creating Client Schema with Microsoft Sync Framework 使用实体框架将新记录插入数据库 - Insert new record into database using Entity Framework Microsoft Sync Framework 2.1与C#中的更改跟踪服务器和客户端数据库同步 - Microsoft Sync Framework 2.1 with Change Tracking Server & Client Database Synchronization in C# 如何清除Sync Framework客户端数据库表中的筛选数据 - How to purge filtered data in Sync Framework client database tables 如何确保使用Microsoft Sync Framework的同步成功? - How to make sure synchronization using the Microsoft Sync Framework was successful? 如何使用c#在VS 2012中使用Microsoft.Ace.Oledb在Excel工作表中插入新行 - How to insert a new Row in Excel sheet using Microsoft.Ace.Oledb in VS 2012 using c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM