ado.net保存

编程入门 行业动态 更新时间:2024-10-10 10:24:47
本文介绍了ado保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好朋友,我想保存到我的sql服务器中的数据以进行简历项目,我希望当用户单击表单中的保存"按钮时如何保存所有数据,如何建立连接以及如何在sql server2005中保存数据 请给我解决方法 谢谢你……

hello friends i want to save to data in my sql server to project of resume i want all data atomatic save when user click save button in form how to make connection and how to save the data in sql server2005 please give me solution Thank u......

推荐答案

在开始工作之前,您需要学习ADO.NET.这是一个CodeProject文章,您可以从这里开始:为初学者使用ADO.NET [ ^ ].另外,Google是您最好的朋友. 祝你好运. Before you start working, you need to learn ADO.NET. Here is a CodeProject article that you can start with : Using ADO.NET for beginners[^]. Also, Google is your best friend. Best of luck.

尝试这些 1.在ADO.Net上购买一本书并学习 2. ADO.Net上的Google 3.在MSDN上搜索样本 4.在C#上找到一些老师 Try these 1. Buy a book on ADO.Net and study 2. Google on ADO.Net 3. Search samples on MSDN 4. Find some teacher on C#

字符串str ="DataSource = ...;用户ID = ..;密码= ...;数据库= ..."; SqlConnection con =新的SqlConnection(str); con.Open(); SqlCommand cmd =新的SqlCommand(插入TableName(列名)值()",con); SqlDataReader dr; dr = cmd.ExecuteReader(); int i = cmd.ExecuteNonQuery(); con.Close(); 这是使用ado string str="DataSource=...;User Id=..;Password=...;Database=..."; SqlConnection con=new SqlConnection(str); con.Open(); SqlCommand cmd=new SqlCommand("Insert into TableName (Column Names) Values ()",con); SqlDataReader dr; dr=cmd.ExecuteReader(); int i=cmd.ExecuteNonQuery(); con.Close(); This is the Sample Code to insert the data into the Sql Server using ado

更多推荐

ado.net保存

本文发布于:2023-11-09 11:51:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572303.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ado   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!