Adding collumn collation to a table in a data set

G

Guest

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.
 
G

Guest

The DataTable doesn't support a per-column collation, unlike Sql Server.
To change DataTable's behavior, use the Locale and CaseSensitive properties.
 
G

Guest

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top