Via SQL Server Management Studio (or via a SQL query), we can export one or more tables (data or structure or both of them) with related tables, and we can import them via the same methods as shown in the screenshots.
But this way will export the all the content of the selected tables:
Is there a way to export a range of selected rows?
To be more explicit, we have to export a range of client that the user will check in the client list and export them with sub entities etc. For example, clients with orders, order items, quotes, quote items, appointments etc.
I can not use backup-restore because I am talking about two existing different database. Users want only share some of clients.
Briefly, the user 1 will export some data in a zipped file, send the file to user 2 and the user 2 will import the data by selecting the zipped file.
The zipping part is not a problem, using
System.IO.Compression.ZipFile.CreateFromDirectory(...
or another compression dll we can create the zip file easily.
Currently the only solution that I am thinking is exporting the data in a file and importing them one by one via some foreach loops in an ordinary way.
Any better idea, please?
13