最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
快速开发vs.net+c#程序(-)
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
SQLPilot.exe这个程序是CCF的一个朋友写的,具体请参考http://bbs.et8.net/bbs/showthread.php?t=534183
二、已有数据库表,快速生成列表、基本查询、高级查询、插入新行、删除、编辑asp.net页面的工具Asp.Net Maker
http://www.hkvstore.com/aspnetmaker/
1.数据库操作类
以下是C#代码:
头文件:
using System;using System.Web.UI;using System.Globalization;using System.Data;using System.Data.SqlClient;namespace ns_db{public class c_db: UserControl{
//******************************** // 返回数据库连接字符串 //********************************
public string ewConnStr() { return "Password=******;Persist Security Info=True;User ID=sa;Initial Catalog=******;Data Source=
(Local)"; } // End ewConnStr
//****************************************************** // 返回一个 DataView 根据 Connection String & SQL //******************************************************
public DataView ewDataView(string sConn, string sSQL) { try {
// Create a new Connection Object SqlConnection oConn = new SqlConnection(sConn);
// Create a new DataAdapter using the Connection Object and SQL statement SqlDataAdapter oDa = new SqlDataAdapter(sSQL, oConn);
// Create a new DataSet Object to fill with Data DataSet oDs = new DataSet();
-
下一个: C#对XML操作:编辑XML文件内容