易截截图软件、单文件、免安装、纯绿色、仅160KB

数据交换学习二: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


相关文档:

ASP.NET 文件上传

在ASP中,将文件上传到服务器是一件非常麻烦的事情,通常需要第三方组件的支持。
在ASP.NET 1.x 中,要支持文件上传,只须使用HTML的Input(File)控件。把它作为服务器控件运行(手动设置runat="server") ,要直接操作 HttpPostedFile。
在ASP.NET 2.0中,新增了FileUpLoad服务器控件,使得上传更加简单。
包& ......

c# 操作mssql数据库 含有带参数sql语句运行

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <appSettings>
  <add key="Default" value="Default" />
 </appSettings>
 <connectionStrings>
  <add name="Default" connectionString="Data Source=192.168.1.197;User ID ......

(转)Sqlserver合并复制的web同步详解(转微软三篇)2


如何为 Web 同步配置 IIS
本主题中的过程是为合并复制配置 Web 同步的第二个步骤。应在为 Web 同步启用发布后执行此步骤。有关配置过程的概述,请参阅 配置 Web 同步。完成本主题中的过程后,请继续执行第三个步骤“配置订阅以使用 Web 同步”。下列主题中将介绍第三个步骤:
SQL Server Management Studio: ......

SQLServer 最常用的索引字段(通用索引字段)

一、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
二、创建索引的其他因素(主要因素都因为索引是数据表外部 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号