简体   繁体   English

从Access前端更新SQL Server

[英]Updating SQL server from Access front end

This is pretty new to me. 对我来说这是很新的。 I have an Access database that I was to upsize to a SQL server but to keep the Access front end to make this application available remotely. 我有一个Access数据库,该数据库要升迁到SQL Server,但要保留Access前端以使该应用程序可以远程使用。 I have imported the data in the SQL database using SSMA which looks to be fine. 我已经使用SSMA将数据导入SQL数据库中,看起来不错。 However, when adding a new record to the Access frontend, the SQL server is not being updated. 但是,将新记录添加到Access前端时,不会更新SQL Server。 Am I missing something? 我想念什么吗? I (think I) have linked the tables together but still not joy. 我(认为我)已将桌子链接在一起,但仍然不高兴。

Any help would be great. 任何帮助都会很棒。 Thank you 谢谢

If the data is being stored, but not on the SQL Server then you almost certainly have not linked the tables correctly. 如果要存储数据,但不在SQL Server上,则几乎可以肯定没有正确链接表。 On your Access front end your starting point should be no tables (unless you have some tables deliberately reserved for the front end for some reason). 在Access前端,您的起点不应是任何表(除非出于某些原因有意为前端保留一些表)。 You then link to the back end tables (because you said 'linked the tables together', I suspect you have copies of the tables still in your front end). 然后,您链接到后端表(因为您说过“将表链接在一起”,我怀疑您的表副本仍在前端)。 During the linking process, Access will confirm if each link is established successfully. 在链接过程中,Access将确认每个链接是否成功建立。

It sounds like you haven't imported the data from MS Access to SQL yet. 听起来您尚未从MS Access导入数据到SQL。

Check out the SQL Server Migration Assistant(SSMA) on how to do that. 查看有关如何执行此操作的SQL Server迁移助手(SSMA)。 http://www.microsoft.com/sqlserver/en/us/product-info/migration-tool.aspx#Access . http://www.microsoft.com/sqlserver/zh-CN/product/info/migration-tool.aspx#Access

First you need to migrate the data to SQL and then you link the data in SQL to MS-Access. 首先,您需要将数据迁移到SQL,然后将SQL中的数据链接到MS-Access。 Once the tables are linked appropriately it will update in SQL as it is entered in Access. 一旦表正确链接,它将在SQL中更新,就像在Access中输入的一样。 To link the tables you need to first setup an ODBC and then in access select external data -> import -> more -> ODBC Database and select "Link to the data source by creating linked tables" 要链接表,首先需要设置一个ODBC,然后在访问中选择外部数据->导入->更多-> ODBC数据库,然后选择“通过创建链接表链接到数据源”

Check out this link: http://www.fontstuff.com/ebooks/free/fsLinkingToSQLServer.pdf to make sure you did it right. 请查看此链接: http : //www.fontstuff.com/ebooks/free/fsLinkingToSQLServer.pdf ,以确保您做对了。

I had this problem before. 我以前有这个问题。

Create a primary key for every table you want to edit in Access. 为要在Access中编辑的每个表创建一个主键。 set identity specification and Identity increment by 1 or ? 将身份规范和身份增量设置为1或? (you can find this setting in column properties) Make sure data type for primary key is int. (您可以在列属性中找到此设置)确保主键的数据类型为int。

All boolean value fields should have constraint set to 0 and no null values. 所有布尔值字段的约束都应设置为0,并且不能为空值。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM