Home All Groups Group Topic Archive Search About

Adding collumn collation to a table in a data set

Author
27 Apr 2006 7:11 PM
Fiddelm3742
So, here's my new issue.  When I add data from my external datafile to my
data table in my dataset I get an error on one of my columns because it
thinks i have duplicate values (happens to be my PK of my table) in this
specific column.  Is it possible to add collation to a collumn in my data
table.  I created the layout of the data table as follows:
  dsInfo.Tables.Add(tblToLoad);
  da.SelectCommand = cmdTableToLoad;
  da.FillSchema(dsInfo, SchemaType.Source, strLoadTable);
the command is just a select * from the table I want to load that is in my
database.  It grabs the schema and creates the correct collumns, but it
doesn't see the collation that collumn has in my actual database.
Any suggestions.


Author
28 Apr 2006 9:44 PM
Mark Ashton
The DataTable doesn't support a per-column collation, unlike Sql Server.
To change DataTable's behavior, use the Locale and CaseSensitive properties.

Show quote
"Fiddelm3742" wrote:

> So, here's my new issue.  When I add data from my external datafile to my
> data table in my dataset I get an error on one of my columns because it
> thinks i have duplicate values (happens to be my PK of my table) in this
> specific column.  Is it possible to add collation to a collumn in my data
> table.  I created the layout of the data table as follows:
>   dsInfo.Tables.Add(tblToLoad);
>   da.SelectCommand = cmdTableToLoad;
>   da.FillSchema(dsInfo, SchemaType.Source, strLoadTable);
> the command is just a select * from the table I want to load that is in my
> database.  It grabs the schema and creates the correct collumns, but it
> doesn't see the collation that collumn has in my actual database.
> Any suggestions.
>
> --
>
>
> Matt
> www.Fiddelke.org
Author
1 May 2006 2:56 PM
Fiddelm3742
Well that's te exact behavior I was looking for.  Collation or not, all I
needed was the ability to check for case sensitivity, I just didn't really
know what to look for.  This is it, Thanks!
Show quote
"Mark Ashton" wrote:

> The DataTable doesn't support a per-column collation, unlike Sql Server.
> To change DataTable's behavior, use the Locale and CaseSensitive properties.
>
> "Fiddelm3742" wrote:
>
> > So, here's my new issue.  When I add data from my external datafile to my
> > data table in my dataset I get an error on one of my columns because it
> > thinks i have duplicate values (happens to be my PK of my table) in this
> > specific column.  Is it possible to add collation to a collumn in my data
> > table.  I created the layout of the data table as follows:
> >   dsInfo.Tables.Add(tblToLoad);
> >   da.SelectCommand = cmdTableToLoad;
> >   da.FillSchema(dsInfo, SchemaType.Source, strLoadTable);
> > the command is just a select * from the table I want to load that is in my
> > database.  It grabs the schema and creates the correct collumns, but it
> > doesn't see the collation that collumn has in my actual database.
> > Any suggestions.
> >
> > --
> >
> >
> > Matt
> > www.Fiddelke.org

AddThis Social Bookmark Button