I want export data from MSSQL SERVER 2008 from Excel, but i have error
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"
returned message "Bookmark is invalid.".
Msg 7343, Level 16, State 2, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"
could not INSERT INTO table "[Microsoft.ACE.OLEDB.12.0]".
its my excel file on export (file save in format 97-2003)
its my query
Tell me please why i get errors? What me need doing?
I have office 32 bit version installed and Sql server 2008 r2 (64 bit) installed. I tried installing the 64 bit version of the AccessDatabaseEngine redistributable but it wouldnt let me. I then tried to install the 32 bit version but then sql server was complaining:
So then I was resigned to the installing office 64 bit. Then I noticed the "Import and Export Data (32 bit option)" in the "Microsoft Sql server 2008 r2" startup menu. So I tried that and it worked for me.
I had been trying to import the data, by right clicking on the "database -> Tasks - Import Data.." which was obviously opening up the 64 bit version and causing me pain.
Check/Set the registry key below manually (exact path is specific to your SQL server version):
It seems to be a problem to use Jet 4.0 and ACE.OLEDB.12 concurrently.
Try this
OR
After many struggles with this issue, I found the following solution:
Open up SQL Server and run the following:
Now, if you are running OPENROWSET calls you need to abandon calls ,made using the old JET parameters and use the new calls as follows:
1- Install AccessDatabaseEngine_x64.exe or AccessDatabaseEngine.exe if you are using 32 bit version of windows (Restart is required).
2- If you are using SQL Management Studio, run Management Studio as administrator. If you don’t run it as an administrator account you will have this error (Cannot initialize the data source object of OLE DB provider "MICROSOFT.ACE.OLEDB.12.0" for linked server "(null)".
3- Run this command to configure your Database
4- Don’t use ‘select * from sheet1$’ in OPENROWSET function. Try this code.
If still you have (32 bit) error, try to restart your SQL service and check your C:\Windows\Temp and see do you have access to this directory or not.