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

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - 雨叶秋寒

sjCatSoft上传组件 - 雨叶秋寒 - 博客园 JavaScript判断上传文件类型 - 雨叶秋寒 - 博客园 MSSQL的“未与信任SQL SERVER相关联”错误 JAVA中数据类型的转换 在JavaBean中存放数据 - 雨叶秋寒 - 博客园 JSP中的缓冲区你到底能用多少? - 雨叶秋寒 - 博客园 JSP中out对象的方法总结 JSP中的两种包含页面的方法 - 雨叶秋寒 - 博客园 控制TextBox的ReadOnly属性 - 雨叶秋寒 - 博客园 用计划任务定时执行ASP文件 - 雨叶秋寒 - 博客园 读邹建的书(第二章) ASP备份MSSQL数据库 利用ADOX更改字段名 ADOX使用范例(调试成功) ADOX 对象总结 调用类 MSDN给出的Hashtable的示例 Snippet Compiler 对ArrayList 的简单研究
调用存储过程
雨叶秋寒 · 2005-08-01 · via 博客园 - 雨叶秋寒

SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
SqlCommand myCommand 
= new SqlCommand("AddGuestBook",myConnection);
myCommand.CommandType 
= CommandType.StoredProcedure;  //置命令字符串为存储过程

//下面是设置存储过程所需要的参数   parameterUserName是实参   @UserName是形参  userName是变量

SqlParameter parameterUserName = new SqlParameter("@UserName",SqlDbType.NVarChar,50);
   parameterUserName.Value=userName;
   myCommand.Parameters.Add(parameterUserName);//打开连接,执行存储过程后关闭
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();