易截截图软件、单文件、免安装、纯绿色、仅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 Excel导入到SQL Server数据库


ASP.NET Excel导入到SQL Server数据库
提供把Excel里的数据导入到SQL Server 数据库,前提是Excel里的字段在Sql Server表里都有,不然会出现错误。注释很详细哦!要引用的命名空间是:
using System.Data.OleDb;
using System.Data.SqlClient;
//操作类
 public class ExcelToSQL
{
  & ......

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: ......

ASP.NET中高级程序员 面试题


作者: 王景  来源: 博客园  发布时间: 2010-03-08 14:18  阅读: 239 次  原文链接   [收藏]  
  最近在招聘新的团队成员中,自己想出了一些问题。先列出来,有机会不断更新吧。
  第一部分:
  互相介绍及了解
  1.请介绍一下你 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号