最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

.net - Syntax error using DefaultView.RowFilter on DataTable - Stack Overflow

programmeradmin0浏览0评论

I'm getting this error when my code runs and I can't work out why as the syntax looks on point but I could be missing or misunderstanding something

System.Data.SyntaxErrorException: 'Syntax error: Missing operand after 'OrganisationSiteCode' operator.'

This is the code. Treatments is a simple data access layer object. I've tried various syntax changes but still the error.

            Dim siteCode = 'RHA58'
            Dim RowF = $"SiteCode IN (SELECT OrganisationSiteCode FROM vwOrganisations WHERE OrganisationCode = (SELECT DISTINCT OrganisationCode FROM vwOrganisations WHERE OrganisationSiteCode = '{siteCode}'))"
            Treatments.getDataTable.DefaultView.RowFilter = RowF
发布评论

评论列表(0)

  1. 暂无评论