將Excel的資料匯入到SQL 2005現有的表中

2021-08-25 04:20:59 字數 904 閱讀 4808

我在將excel的資料匯入到sql的時候老是出現下面的錯誤:

配置選項 'show advanced options' 已從 1 更改為 1。請執行 reconfigure 語句進行安裝。

配置選項 'ad hoc distributed queries' 已從 1 更改為 1。請執行 reconfigure 語句進行安裝。

訊息 7399,級別 16,狀態 1,第 1 行

鏈結伺服器 "(null)" 的 ole db 訪問介面 "microsoft.jet.oledb.4.0" 報錯。提供程式未給出有關錯誤的任何資訊。

訊息 7303,級別 16,狀態 1,第 1 行

無法初始化鏈結伺服器 "(null)" 的 ole db 訪問介面 "microsoft.jet.oledb.4.0" 的資料來源物件。

我將**貼出來,望大家幫忙指點一下啊!非常感謝!

///

/// 開啟檔案

///

///

///

private void button2_click(object sender, eventargs e)

public void execmothod()

else

con.close();

}///

/// 匯入

///

///

///

private void button1_click(object sender, eventargs e)

);dataset ds = new dataset();

foreach (datarow dr in dtschema.rows)

execmothod();

conn.close();

//killprocess();

sql語句將excel資料匯入到表

訪問外部資料時,opendatasource的使用範例 注意 sql2000預設是啟用opendatasource功能的。但sql2005是預設不啟用的。如果在sql2005中要使用opendatasource,則需要先開啟。開啟方式 方式一 手工修改sql配置 在sql2005的配置工具 sql ...

將Excel資料匯入到SQL Server資料庫中

1 接受資料匯入的表已經存在。insert into t1 select from openrowset microsoft.jet.oledb.4.0 excel 5.0 hdr yes database c test.xls sheet1 2 匯入資料並生成表。select into t1 fr...

將Excel資料匯入到SQL Server資料庫中

這個方法是到目前為止我見到最好的方法,還有幾個要注意的問題也在下面提到了哦!其中還涉及到要注意到地方都在下面累出來了 1 接受資料匯入的表已經存在。insert into t1 select from openrowset microsoft.jet.oledb.4.0 excel 5.0 hdr ...