Wednesday, June 2, 2010

SQL Compact Table Copy/Export samples published

João Paulo Figueira has published a couple of useful sample apps (this time in managed code!) on his new “SmilingSmith” blog:

SQL Compact table copy

How do you make a copy of a SQL Compact table? Version 3.5 does not support the SELECT INTO command that allows you to easily do just that. Instead, it provides the INSERT INTO SELECT FROM command that allows you to copy existing table data into another existing table. So we are only missing one part: how to create a replica of the existing table structure.

SQL Compact table export

This is a very simple variation on my last blog post: instead of copying the table to the same database, you can now copy it to another database (although with the same table name, but you can easily change that).


1 comment:

João Paulo Figueira said...

It's outrageous how some people still use native code to access databases! They should be banned from the community... ;-)

Thanks for the link, Erik!