惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
Know Your Adversary
Know Your Adversary
Security Latest
Security Latest
Spread Privacy
Spread Privacy
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
N
News | PayPal Newsroom
A
Arctic Wolf
NISL@THU
NISL@THU
W
WeLiveSecurity
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
P
Palo Alto Networks Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏
L
Lohrmann on Cybersecurity
Last Week in AI
Last Week in AI
T
Threatpost
The Last Watchdog
The Last Watchdog
博客园_首页
C
Cybersecurity and Infrastructure Security Agency CISA
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
Engineering at Meta
Engineering at Meta
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
S
Security Affairs
P
Privacy & Cybersecurity Law Blog
B
Blog RSS Feed
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
雷峰网
雷峰网
T
Tenable Blog
Schneier on Security
Schneier on Security
H
Heimdal Security Blog
V2EX - 技术
V2EX - 技术
V
V2EX
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
Latest news
Latest news
Help Net Security
Help Net Security
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
V
Vulnerabilities – Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org

博客园 - 天使爱比目鱼

微软日期格式的改变造成程序崩溃 .NET 中DataGridViewComboBoxCell控件得Bug VB.NET在基类中定义共享事件(类似于C#中的静态事件) 也谈解决Combobox绑定数据后取值出现System.Data.DataRowView的问题 在SQL Server 2014下面使用的SQL2000的Northwind和Pubs示例数据库 VS2015中DataGridView的DataGridViewComBoboxCell列值无效及数据绑定错误的解决方法 DevExpress学习笔记1-ProductsDemo.Win 在VB中使用Linq To SQLite注意事项 在VB中利用Nuget包使用SQLite数据库和Linq to SQLite 在C#中利用Nuget包使用SQLite数据库和Linq to SQLite VB.NET中使用Linq TO SQL添加数据后获得自增长列ID [转载代码]VB.NET 中查询 Linq to SQL 执行时的SQL语句 Linq to SQL 绑定 ComboBox 在VS.NET中根据条件设置不同的MainForm 在T-SQL中使用参数将XML数据添加到SQL数据库的XML列 [转载自键舞者]SELECT IDENT_CURRENT(tableName)获得自增长列ID的实现 测试Windows Live Writer 4步搞定:系统必备的安装位置未设置为组件供应商的网站,无法在磁盘上找到 dotNetFx40LP_Client_x86_x64cs.exe 问题的解决方案 VS2010 SP1 简体中文测试通过,繁体未测试 控件命名规范(转自CSDN)
去除Linq to Sql 查询结果中的空格
天使爱比目鱼 · 2015-12-25 · via 博客园 - 天使爱比目鱼

原来的写法:

Dim db = From city In DataContext1.AddressCity

               Where city.ProvinceID = dgvAddress(2, e.RowIndex).Value.ToString  、

               Select city.CityID, city.CityName.Trim

可以去掉CityName中的空格,但是db中的列名改变了,在绑定Combobox中出现了错误。

修改后的写法:

Dim db = From city In DataContext1.AddressCity
                         Where city.ProvinceID = dgvAddress(2, e.RowIndex).Value.ToString
                         Select New With {.CityID = city.CityID, .CityName = city.CityName.Trim}

可以正确绑定Combobox了。