最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
快速开发vs.net+c#程序(-)
时间:2022-07-02 11:11:46 编辑:袖梨 来源:一聚教程网
一、已有数据库(SQL)表,快速生成对应存储过程的工具。SQLPilot.exe
SQLPilot.exe这个程序是CCF的一个朋友写的,具体请参考http://bbs.e**t*8.net/bbs/showthread.php?t=534183
二、已有数据库表,快速生成列表、基本查询、高级查询、插入新行、删除、编辑页面的工具Asp.Net Maker
http://www.hk*v*stor*e.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();
SQLPilot.exe这个程序是CCF的一个朋友写的,具体请参考http://bbs.e**t*8.net/bbs/showthread.php?t=534183
二、已有数据库表,快速生成列表、基本查询、高级查询、插入新行、删除、编辑页面的工具Asp.Net Maker
http://www.hk*v*stor*e.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();
相关文章
- 王者荣耀10周年3千点券这么花-十周年3000点券使用建议 10-13
- 明日方舟真言值得抽吗-真言抽取建议 10-13
- 永劫无间手游南宫锦武器选哪个好-南宫锦武器选择推荐 10-13
- 王者荣耀月之回廊入口在哪-月之回廊入口位置介绍 10-13
- 羊蹄山之魂的时代背景是什么 羊蹄山之魂时代故事背景介绍 10-13
- 洛克王国世界吉格斯怎么打-吉格斯打法攻略 10-13