关于execl 导入sql的问题
我想把execl表插入SQL,语句是这样写的!
Dim str1 As String
str1 = "SELECT * into sheet1$ FROM OpenDataSource ( ' Microsoft.Jet.OLEDB.4.0 ', ' Data Source=" + "c:\1.xls" + ";User ID=admin;Password=;Extended properties=Excel 5.0')...sheet1$"
Dim cn As New SqlConnection("Persist Security Info=False;Integrated Security=SSPI;database=demo;password = ;server=localhost;Connect Timeout=30")
Dim cmd As SqlCommand = New SqlCommand(str1, cn)
cn.Open()
Dim count As Integer = cmd.ExecuteNonQuery()
运行出现错误“未能找到 OLE DB 提供程序 ' Microsoft.Jet.OLEDB.4.0 ' 的注册表项”
这是怎么回事啊?
晚上要把程序给老大了,各位知道提个醒啊!