简体   繁体   中英

Cannot import data from Access to MS SQL Server

I am trying to migrate a vb.NET project from an MS Access database to MS SQL Server, and have been following a tutorial I found here to do so. I did this, but got a problem where I could read data from the SQL Server database when running my project, but could not insert/edit data using the project.

Any data I tried to manipulate only worked on the Access database, and didn't have any affect on the SQL Server data (I also tried vice-versa, adding data using SQL Server but this couldn't been seen in my project). So I decided to try again, deleting the Access and SQL Server databases, and using the backup database to import the data from. However, this now is not working, and I'm getting the following error message

Error 0xc020801c: Source - ~TMPCLP123581 1 : SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "SourceConnectionOLEDB" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. (SQL Server Import and Export Wizard)

Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)

Does anybody know a fix for this? Or why I can no longer import data into SQL Server? (The image below shows the result of what processes were/weren't carried out)

在此输入图像描述

I've fixed the issue now, guys.

I migrated it over using Microsoft SQL Server Migration Assistant for Access, and then changed the connection path and settings in my .ini file.

Then I created a new connection string, using string variables for each of the settings in the .ini file, and this replaced the initial Access database connection string.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM