开发者

Column name with special characters

开发者 https://www.devze.com 2023-01-02 08:26 出处:网络
I have web service which returns a datatable with the following column name: Id@qb>type I am applying the开发者_运维百科 following filter statement to this datatable:

I have web service which returns a datatable with the following column name:

Id@qb>type

I am applying the开发者_运维百科 following filter statement to this datatable:

[Id@qb>type] IN (0, 1, 2, 3, 4)

But whenever I use this column name in the filter statement it throws the following exception:

Invalid column name 'Id@qb>type'.

Thanks.


I'm not sure exactly how you're using the column, but I can think of two possible solutions:

1) Refer to the column by index instead of name.

2) Modify the procedure you're using to fill your Datatable so that it uses an alias for that column which is more code-friendly.

0

精彩评论

暂无评论...
验证码 换一张
取 消