求教:关于oledb连接sqlserver2008数据库问题
用sql连接没问题:
Public conn As SqlConnection = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Timetable.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True")
Public conn As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider=sqloledb;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Timetable.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True")