关于表的问题从访问sql升迁db [英] Questions about tables upsized db from access to sql

查看:50
本文介绍了关于表的问题从访问sql升迁db的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Access数据库,我升级到SQL服务器数据库。我无法修改表格。我想在表格中插入一些数据

我收到以下错误:


---开始错误---

服务器:Msg 107,Level 16,State 3,Line 1

列前缀''SVC_Details''与表名或别名不匹配

name在查询中使用。

---结束错误---


名为SVC_Details的表是从Access升迁的表。

表在查询分析器和sql企业管理器中列出。我知道

不知道为什么我收到这个错误。


我使用以下代码插入数据:


---开始代码---

插入SVC_Details(svccode,svcdesc,价格)

从svc_details_chrg_mastr中选择svccode,svcdesc,svcprice

其中svc_details_chrg_mastr.svccode<> SVC_Details.svccode

---结束代码---


我在Windows 2003 Standard服务器上运行MS-SQL 2000标准。


提前感谢所有帮助!!

I have an Access DB that I upsized to a SQL server DB. The tables that I
upsized I can''t seem to modify. I wanted to insert some data into the table
and I am getting the following error:

---Begin Error---
Server: Msg 107, Level 16, State 3, Line 1
The column prefix ''SVC_Details'' does not match with a table name or alias
name used in the query.
---End Error---

The table called SVC_Details is the table that was upsized from Access. The
table is listed in both the query analyzer and sql enterprise manager. I do
not know why I am getting this error.

I am using the following code to insert the data:

---Begin Code---
insert into SVC_Details(svccode, svcdesc, price)
Select svccode, svcdesc, svcprice from svc_details_chrg_mastr
Where svc_details_chrg_mastr.svccode <> SVC_Details.svccode
---End Code---

I am running MS-SQL 2000 standard on a Windows 2003 Standard server.

Thanks in advance for all the help!!

推荐答案

嗨!

在我在Access中链接的SQL-Server数据库中的表,我

插入一个类型为timestamp的字段。因为Access有一个问题

不同的字段类型。通过更新记录,没有时间戳字段

我总是遇到像你这样的错误。

pp

Hi!
In every table in the SQL-Server-databases which I link in Access, I
insert a field with type "timestamp" because Access has a problem with
different field-types. By updating the records wtihout timestamp-field
I got always errors like you.
pp


pp**@gmx.de 在新闻中写道:1130493037.177995.202930

@ g47g2000cwa.googlegroups.com:
pp**@gmx.de wrote in news:1130493037.177995.202930
@g47g2000cwa.googlegroups.com:
嗨!
在我在Access中链接的SQL-Server数据库的每个表中,我都插入一个类型为timestamp的字段。因为Access有不同字段类型的问题。通过更新记录,没有时间戳字段
我总是遇到像你这样的错误。
pp
Hi!
In every table in the SQL-Server-databases which I link in Access, I
insert a field with type "timestamp" because Access has a problem with
different field-types. By updating the records wtihout timestamp-field
I got always errors like you.
pp




???我不明白时间戳与不能更新数据有什么关系?你能给一个例子链接或在这里发帖吗

供我查看?


谢谢Mike



??? I dont understand. What would a time stamp have to do with not being
able to update the data? Can you give a link to an example or post one here
for me to look at?

Thanks Mike


Mike写道:
pp**@gmx.de 在新闻中写道:1130493037.177995.202930
@ g47g2000cwa.googlegroups.com:
pp**@gmx.de wrote in news:1130493037.177995.202930
@g47g2000cwa.googlegroups.com:
嗨!
在我在Access中链接的SQL-Server数据库的每个表中,我都是
插入类型为timestamp的字段因为Access有一个问题
具有不同的字段类型。通过更新记录和时间戳字段我总是得到像你这样的错误。
pp
Hi!
In every table in the SQL-Server-databases which I link in Access, I
insert a field with type "timestamp" because Access has a problem
with different field-types. By updating the records wtihout
timestamp-field I got always errors like you.
pp



???我不明白什么时间戳与不能更新数据有关?你能给我一个例子的链接或
在这里张贴一个吗?

谢谢Mike



??? I dont understand. What would a time stamp have to do with not
being able to update the data? Can you give a link to an example or
post one here for me to look at?

Thanks Mike




简而言之......


首先,您必须了解SQL Server中的Timestamp字段。与其他数据库引擎中的Timestamp相同,它不是
。这是一个二进制值

保证在整个数据库中是唯一的,并且在每行编辑时都会更新。此列将始终显示空的并且不用于

除引擎之外的任何进程。


当您提交更改SQL Server链接表时Access将检查以查看

如果记录被加载到

编辑缓冲区后被其他进程改变了。这是通过检查Timestamp列的值(如果有一个

存在)来完成的,因为每次更改记录时都会更改时间戳(它是一个

很好的快捷方式)。


当没有Timestamp列时,Access必须将每个字段中的值

与缓冲区中的值进行比较。如果该表包含备忘录(SQL Server文本)或任何

DataType,它不能完全转换为Access / Jet数据类型访问可以

得出的结论是记录已被更改,即使它没有。

由于问题取决于DataType的差异,你不需要在每个
SQL Server表中,只有那些有一定的其中包含DataType。很多开发商虽然已经养成了一直包含一个的习惯。


-

我不是查看此邮件附带的电子邮件帐户

。发送给...

在Hunter dot com的RBrandt



In a nutshell...

First you have to understand what a Timestamp field is in SQL Server. It is not
the same as a Timestamp in other database engines. It is a binary value that is
guaranteed to be unique across the entire database and which is updated on every
edit to the row. This column will always "appear" empty and is not for use by
any process other than the engine.

When you commit a change to a SQL Server linked table Access will check to see
if the record has been altered by other processes since being loaded into the
edit buffer. This is done by examining the Timestamp column''s value (if one is
present) because a Timestamp is changed every time the record is changed (it''s a
nice shortcut).

When there is no Timestamp column Access has to compare the value in every field
to what''s in the buffer. If the table includes memo (SQL Server text) or any
DataType that doesn''t translate exactly to an Access/Jet DataType Access can
come to the conclusion that the record has been altered even when it has not.
Since the problem depends on DataType differences you don''t need one in EVERY
SQL Server table, only those with certain DataTypes in them. Many developers
though have gotten into the habit of including one all the time.

--
I don''t check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


这篇关于关于表的问题从访问sql升迁db的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆