数据交换学习二:asp.net C# 对 sqlserver表的操作
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
//显示数据示例
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//创建表及插入数据
//use jwcrm
//create table userinfo(username char(10),userpwd char(10))
//insert into userInfo values('潘万飞','123456')
//insert into userInfo values('李世明','678910')
//select * from userinfo
//连接SQL
SqlConnection thisConnection = new SqlConnection("Server=127.0.0.1;uid=sa;pwd=123;database=jwcrm");
//创建数据库适配器
SqlDataAdapter thisAdapter = new SqlDataAdapter("select * from userinfo", thisConnection);
SqlCommandBuilder thisBuilder = new SqlCommandBuilder(thisAdapter);
DataSet thisDataSet = new DataSet();
thisAdapter.Fill(thisDataSet, "userinfo");
int i = 0;
foreach(DataRow rowData in thisDataSet.Tables[0].Rows)
{
i++;
&n
相关文档:
一、SQLServer 通用索引字段
1、Primary Key's 主键
2、Foreign Key's 外键
3、支持SELECT、INSERT、UPDATE和DELETE命令的字段 :
(1)、INNER JOIN
(2)、RIGHT | LEFT OUTER JOIN
(3)、WHERE
(4)、ORDER BY
(5)、GROUP BY
(6)、HAVING
二、创建索引的其他因素(主要因素都因为索引是数据表外部 ......
今天在VS2005调试一个C# C/S程序,当通过RFC与SAP连接时间过长时,出现此错误,在网上找到解决办法。
VS2008上的一个程序,通过Oracle.DataAccess.dll执行drop user
cascade操作,我在sqlplus执行此操作大约需要一分钟左右时间,当我在VS2008中debug启动此程序时,一直接收到
“ContextSwitchDeadlock is detected& ......
ASP.NET是由微软在.NET Framework中所提供的,开发Web应用程序的类库,封装在System.Web.dll文件中,显露出System.Web命名空间,并提供ASP.NET网页处理、扩充以及HTTP通道的应用程序与通信处理等工作,以及Web
Service的基础架构。ASP.NET是ASP技术的后继者,但它的发展性要比ASP技术要强大许多。
ASP.NET可以运行在安 ......
ASP.NET Excel导出(动态生成)解决方案
(一)、服务器端的excel组件来生成目标Excel
即在后台调用excel组件,来读取模板,填写模板的。就是后台启动Excel来处理的,在进程管理器里可以查看到它的进程。
优点:Excel处理功能丰富,多样,可以完成一切的Excel文件处理。
缺点:服务器端要装Excel ......