David David - 1 year ago 93
Vb.net Question

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)

enter image description here

Answer Source

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.