Red Gate forums :: View topic - BackupConnection Object cannot be called from user code.
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare 10
SQL Data Compare 10 forum

BackupConnection Object cannot be called from user code.

Search in SQL Data Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
zaliis



Joined: 18 Mar 2014
Posts: 8

PostPosted: Tue Mar 18, 2014 10:09 pm    Post subject: BackupConnection Object cannot be called from user code. Reply with quote

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.
Back to top
View user's profile Send private message
zaliis



Joined: 18 Mar 2014
Posts: 8

PostPosted: Wed Mar 19, 2014 5:10 am    Post subject: Posted in the incorrect Forum Reply with quote

I noticed that this is the incorrect forum for this post so please ignore it and I will re-post it correctly.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6645

PostPosted: Wed Mar 19, 2014 10:44 am    Post subject: Reply with quote

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/Comparing_backup_to_live_database

Hopefully this is useful for you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group