打开数据库有两种形式:
1、连接字符串:
例如:string strconn = "data source = (local);uid=sa;pwd=as;initial catalog = db_staff;integrated security = true";
2、数据源odbc.控制面板-管理工具-数据源odbc
例如建立一个叫xx的数据源后,可以通过下面来打开数据
string strconn ="dsn=xx"
文章分类: |
|
上传中....