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

推荐订阅源

T
Tor Project blog
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
I
InfoQ
The Cloudflare Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
美团技术团队
B
Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Last Week in AI
Last Week in AI
TaoSecurity Blog
TaoSecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
H
Heimdal Security Blog
爱范儿
爱范儿
博客园_首页
SecWiki News
SecWiki News
腾讯CDC
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
The Register - Security
The Register - Security
N
News | PayPal Newsroom
Recent Commits to openclaw:main
Recent Commits to openclaw:main
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Security Latest
Security Latest
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
T
The Blog of Author Tim Ferriss
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
Attack and Defense Labs
Attack and Defense Labs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Webroot Blog
Webroot Blog
C
Check Point Blog
Y
Y Combinator Blog
T
The Exploit Database - CXSecurity.com
aimingoo的专栏
aimingoo的专栏
I
Intezer
博客园 - 叶小钗
Cisco Talos Blog
Cisco Talos Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件

博客园 - Toney

[转]IT从业人员必看的10个论坛 国内.NET论坛源代码搜集 Ajax学习网址收集 Crystal Report Download URL and SN 学习计划 清辅音与浊辅音的区别 ASP.NET中实现URL重写 Asp.Net Form事件处理过程?? 建立职场B计划 世界五百强面试题目及应答评点10 各路由器的默认密码列表 .Text引用第三方组(控)件明细^_^ Debug和Release的区别 Visual Studio 2005 Express October 2004 CTP完整版本的下载 从 SQL Server 2005 中处理 XML ASP.NET 中的正则表达式 递归遍历XML生成树 如何构建积木式Web应用(引自微软CSDN ) Configuring IIS: Mapping .* to the aspnet_isapi.dll
数据库应用:无法更新到数据库
Toney · 2004-11-13 · via 博客园 - Toney


下列代码去掉注示行后出错,无法在DataSet中更新数据,不知为什么?????????????????????

string myConnection="user id=sa;password=toney;initial Catalog=TestDB;Data Source=localhost";
string mySelectQuery="select * from company";

SqlConnection myConn = new SqlConnection(myConnection);
SqlDataAdapter myDataAdapter = new SqlDataAdapter();
myDataAdapter.SelectCommand = new SqlCommand(mySelectQuery, myConn);
SqlCommandBuilder cb = new SqlCommandBuilder(myDataAdapter);
myConn.Open();

DataSet ds = new DataSet();
myDataAdapter.Fill(ds, "company");

//ds.Tables["company"].Rows[0]["companyip"]="202.11.62.99";

myDataAdapter.Update(ds, "company");
myConn.Close();