数据库
首页 > 数据库> > C#数据库连接方式【简版】

C#数据库连接方式【简版】

作者:互联网

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DataInfo
{
public partial class UserControl1: UserControl
{
private OverSystems.DataAccess.SQLAccess sqlaccessy = new OverSystems.DataAccess.SQLAccess(@"Data Source =DATA;
Initial Catalog=databasesname; User ID=username; Password =pw");

public UserControl1()
{
FillDG();
}

public void FillDG(string str)
{
string CommandText = " sql ...";
sqlaccessy.ExecuteNonQuery(CommandText);
}


}
}

标签:string,C#,简版,SQLAccess,System,数据库,using,Data,public
来源: https://www.cnblogs.com/liuguiqing/p/15230594.html