怎样用oledb连接数据库?
时间:2008-08-06 来源:*^cherish^*
dim connw as oledbconnection
connw = New OleDbConnection("Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=master;Integrated Security=SSPI")'windows身份验证
connw.open()
dim conns as oledbconnection
conns = New OleDbConnection("provider = sqloledb;user id = sa;password=;initial caralog =master;data source =localhost")
conns.open()
连接数据库很简单,关键是连接字符串弄懂.
connw = New OleDbConnection("Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=master;Integrated Security=SSPI")'windows身份验证
connw.open()
dim conns as oledbconnection
conns = New OleDbConnection("provider = sqloledb;user id = sa;password=;initial caralog =master;data source =localhost")
conns.open()
连接数据库很简单,关键是连接字符串弄懂.
相关阅读 更多 +