简体   繁体   English

MS Access + SQL Server 前端连接问题(#NAME)

[英]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.

相关问题 MS Access 前端到 SQL 服务器间歇性 ODBC 连接问题 - MS Access front end to SQL Server intermittant ODBC connection issues 在具有MS Access前端的SQL Server中动态更新记录的问题 - Issues dynamically updating records in SQL Server with MS Access front end MS Access(前端)和使用SQL Server(后端)的第一条记录中的数据丢失 - Missing data in first record in MS Access (front end) and using SQL Server (back end) 到单个远程SQL Server后端的多个MS Access前端连接 - Multiple MS Access Front end Connections to a Single remote SQL Server Back end 如何使用SQL Server后端从MS Access前端导入新数据 - How to Import New Data from MS Access Front End with SQL Server back end 无法将 MS Access 前端连接到 SQL 服务器后端 - Can't connect MS Access front end to SQL Server back end 如何使用MS Access作为前端UI向SQL Server引入参数? - How to introduce a parameter to SQL server using MS Access as a front-end UI? 脱机时通过MS Access前端访问SQL Server数据库的选项有哪些? - What are my options for accessing an SQL Server database through MS Access front-end while offline 无DSN连接MS Access前端和SQL Server后端 - DSN-less Connection MS Access front end and SQL server backend 如何通过 MS Access 前端在 MATLAB 中从 SQL Server 打开记录集 - How to open recordset from SQL Server in MATLAB via MS Access front-end
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM