﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Programming / SMO/RMO/DMO  / SMO Transfering specific rows from specific tables? / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 20:41:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SMO Transfering specific rows from specific tables?</title><link>http://www.sqlservercentral.com/Forums/Topic1112784-22-1.aspx</link><description>It's ok.  I solved the problem by avoiding it.  Using SMO was an experiment and a bad idea for this problem.  Wrong tool for the job.</description><pubDate>Mon, 23 May 2011 16:26:28 GMT</pubDate><dc:creator>johnzabroski</dc:creator></item><item><title>RE: SMO Transfering specific rows from specific tables?</title><link>http://www.sqlservercentral.com/Forums/Topic1112784-22-1.aspx</link><description>Hello,I am sorry , but , with my poor english, i am not sure to have fully understood your question.I am using SMO since the release of SQL Server 2005 SP2 ( before SMO was often incomplete or with bugs ).To get the results of a query ( SElECT mainly ) , i am relying on the SqlClient namespace ( so .Net Framework ) and for the SqlConnection necessary to create a SqlCommand , i get it from the SqlConnectionObject  property of Server.ConnectionContext.I have some doubts to have understood your hypothesis about primary keys with a value of 0. Please, could you tell us whether you want to create a primary key on a column having already values ? If yes, you cannot create a primary key on a column if you have several rows with the same value.But, it is possible that i have not understood your question ( usually, i can translate english in french, but french into english , really difficult for me and i hope you will excuse me ).Have a nice day</description><pubDate>Mon, 23 May 2011 15:45:18 GMT</pubDate><dc:creator>patricklambin</dc:creator></item><item><title>SMO Transfering specific rows from specific tables?</title><link>http://www.sqlservercentral.com/Forums/Topic1112784-22-1.aspx</link><description>In many situations, I just want to grab one or two rows from a table and script out the inserts.  It would be nice if SMO did this for me automatically, including handling whether to generate "set identity_insert [schema].[table_name] on/off" lines.I can't use the traditional way to dump table data:ScriptingOptions.ScriptData = trueThis option scripts out EVERYTHING.  I just want one row, e.g. the row where a PK equals 0.What's the best way to do this?</description><pubDate>Fri, 20 May 2011 15:36:01 GMT</pubDate><dc:creator>johnzabroski</dc:creator></item></channel></rss>