SQL 连接字符串有哪几种?
我需要那种连接到本机ODBC里的对应项的那种连接方式,当然,给全了我会加分。用的是VB2005。只需要连接字符串就好。像我用的OLEDB连接字符串用的是Provider=...
我需要那种连接到本机 ODBC 里的对应项的那种连接方式,当然,给全了我会加分。用的是 VB 2005。只需要连接字符串就好。
像我用的 OLEDB 连接字符串用的是
Provider=SQLOLEDB;Dsn=server;server=server;database=pubs; 这样
有没更齐全点的答案呢 展开
像我用的 OLEDB 连接字符串用的是
Provider=SQLOLEDB;Dsn=server;server=server;database=pubs; 这样
有没更齐全点的答案呢 展开
展开全部
'SqlClient provider settings - Customers table Private strSqlProvider As String = "System.Data.SqlClient" Private strSqlConn As String = "Data Source=localhost;" + _ "Initial Catalog=Northwind;Integrated Security=SSPI"
'OleDb provider settings - Products table Private strOleDbProvider As String = "System.Data.OleDb" Private strOleDbConn As String = "Provider=SQLOLEDB;Data Source=localhost;" + _ "Initial Catalog=Northwind;Integrated Security=SSPI"
'Odbc provider settings - Suppliers table Private strOdbcProvider As String = "System.Data.Odbc" Private strOdbcConn As String = "DRIVER={SQL Server};SERVER=localhost;" + _ "Trusted_connection=Yes;DATABASE=Northwind;"
'OleDb provider settings - Products table Private strOleDbProvider As String = "System.Data.OleDb" Private strOleDbConn As String = "Provider=SQLOLEDB;Data Source=localhost;" + _ "Initial Catalog=Northwind;Integrated Security=SSPI"
'Odbc provider settings - Suppliers table Private strOdbcProvider As String = "System.Data.Odbc" Private strOdbcConn As String = "DRIVER={SQL Server};SERVER=localhost;" + _ "Trusted_connection=Yes;DATABASE=Northwind;"
展开全部
SQL 连接字符串有两种
1、利用||如:select t.a||t.b from 表名 t;
2、SELECT CONCAT(t.a,t.b) FROM 表名 t;
1、利用||如:select t.a||t.b from 表名 t;
2、SELECT CONCAT(t.a,t.b) FROM 表名 t;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
"a"+"b"
结果就是"ab"
结果就是"ab"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询