[英]MS Access + SQL Server front end concatenation problem (#NAME)
When I link an SQL Server table to MS Access, I have an issue with concatenation of the SQL Server table/view columns.当我将 SQL Server 表链接到 MS Access 时,我遇到了连接 SQL Server 表/视图列的问题。
I'm used to be doing this in Access: =[FirstName] & " " & [LastName]
我习惯在 Access 中这样做:
=[FirstName] & " " & [LastName]
However, when I do this with data linked from SQL Server, I get #NAME
in the text field every time.但是,当我使用从 SQL Server 链接的数据执行此操作时,我每次都会在文本字段中得到
#NAME
。
I tried to create a local dummy table in Access and the concatenation works without issues.我尝试在 Access 中创建一个本地虚拟表,并且串联工作没有问题。
I also tried to type the concatenation in SQL Server format: =[FirstName] + ' ' + [LastName]
, without success.我还尝试以 SQL Server 格式键入串联:
=[FirstName] + ' ' + [LastName]
,但没有成功。
My current workaround is to create all concatenations directly in the SQL View definitions, but this is quite limiting and I would like to be able to do concatenations directly in Access.我当前的解决方法是直接在 SQL 视图定义中创建所有串联,但这非常有限,我希望能够直接在 Access 中进行串联。
Is it possible?可能吗?
This looks like a new bug in Access这看起来像是 Access 中的一个新错误
I linked to a SQL table and added 2 text boxes to a form one an integer and one text我链接到一个 SQL 表,并在一个表单中添加了 2 个文本框,一个整数和一个文本
on the integer one =[field] & "b" works on the text field it fails.在整数 one =[field] & "b" 上适用于它失败的文本字段。
even just =[textfieldname] throws an error即使只是 =[textfieldname] 也会引发错误
A workaround i found is to add firstname and lastname text boxes and rename them txtfirstname and txtlastname then add a third text box and give the datasource property = [txtfirstname] & " " & [txtlastname]我发现的一种解决方法是添加名字和姓氏文本框并将它们重命名为 txtfirstname 和 txtlastname 然后添加第三个文本框并提供数据源属性 = [txtfirstname] & " " & [txtlastname]
irritating as this used to work烦人,因为这曾经有效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.