|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Creating keys/indexes for SQL tableMy application reads the data from one database (using ODBC connection) and
copies the data to an SQL database (using SQLBulkCopy). This is how I create an SQL table: Dim NewTable As Table = New Table(sqldb, "test") .... NewTable.Columns.Add(cSQL) .... NewTable.Create() I'm trying to define keys and indexes for my table, but I haven't been able to figure out how to do that. Is this possible with the class I'm using? Thank you. Hello Eve,
You can set only DataTable.PrimaryKey property E> My application reads the data from one database (using ODBC E> connection) and copies the data to an SQL database (using E> SQLBulkCopy). This is how I create an SQL table: E> E> Dim NewTable As Table = New Table(sqldb, "test") E> ... E> NewTable.Columns.Add(cSQL) E> ... E> NewTable.Create() E> I'm trying to define keys and indexes for my table, but I haven't E> been able to figure out how to do that. Is this possible with the E> class I'm using? E> E> Thank you. E> --- WBR, Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche --
Show quote
Dave Sexton "Eve" <E**@discussions.microsoft.com> wrote in message
news:2D1F401D-744C-49D9-BF8A-51A9F92BF205@microsoft.com... > My application reads the data from one database (using ODBC connection) > and > copies the data to an SQL database (using SQLBulkCopy). This is how I > create > an SQL table: > > Dim NewTable As Table = New Table(sqldb, "test") > ... > NewTable.Columns.Add(cSQL) > ... > NewTable.Create() > > I'm trying to define keys and indexes for my table, but I haven't been > able > to figure out how to do that. Is this possible with the class I'm using? > > Thank you. Hi,
(Sorry about that accidental blank post) Is "Table" an SMO object? "SQL Server 2005 Books Online How to: Create, Alter, and Remove a Table in Visual Basic .NET" http://msdn2.microsoft.com/de-de/library/ms162203.aspx "SQL Server 2005 Books Online Creating, Altering, and Removing Indexes" http://msdn2.microsoft.com/de-de/library/ms162215.aspx -- Show quoteDave Sexton "Eve" <E**@discussions.microsoft.com> wrote in message news:2D1F401D-744C-49D9-BF8A-51A9F92BF205@microsoft.com... > My application reads the data from one database (using ODBC connection) > and > copies the data to an SQL database (using SQLBulkCopy). This is how I > create > an SQL table: > > Dim NewTable As Table = New Table(sqldb, "test") > ... > NewTable.Columns.Add(cSQL) > ... > NewTable.Create() > > I'm trying to define keys and indexes for my table, but I haven't been > able > to figure out how to do that. Is this possible with the class I'm using? > > Thank you. |
|||||||||||||||||||||||