BackupConnection Object cannot be called from user code.

Compares and synchronizes SQL database content.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, Michelle Taylor, chengvoon.tong

BackupConnection Object cannot be called from user code.

Postby zaliis » Tue Mar 18, 2014 10:09 pm

when I attempt to create an instance of the BackupConnection using the default ctor I get the following error message

SQL Backup Reader may not be called from user code

Is there anyway I can read the data from a backup for a table. I ask because my code only wants to work with backups and not the live databases.

Thanks

I guess I should supply you a bit more information. I need to do a schema and data compare between two backup SQL Server 2008 databases. If I detect a schema or data difference I need to output the target database to a Sql CE sdf. I have the code working to output the database schema I just need to know how to read all records from each table in the backup using the SDK. I will then insert this data into the appropriate Sql CE database.
zaliis
 
Posts: 8
Joined: Tue Mar 18, 2014 10:05 pm

Posted in the incorrect Forum

Postby zaliis » Wed Mar 19, 2014 5:10 am

I noticed that this is the incorrect forum for this post so please ignore it and I will re-post it correctly.
zaliis
 
Posts: 8
Joined: Tue Mar 18, 2014 10:05 pm

Postby Brian Donahue » Wed Mar 19, 2014 10:44 am

Hello,

You may be creating an object that does not have a constructor meant for public use. If you want to compare data in a backup, here is an example.

http://sdk.red-gate.com/index.php/Compa ... e_database

Hopefully this is useful for you.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Data Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests