Hi!
I have a query used in mysqldatatable where a field in the table in the DB is set to uniqe:
http://sharing.profixio.com/uploads/201 ... 121744.png
Is it possible to set this field to something like "uniqe = false" in the configuration of the mysqdatatable?
Thanx! /Ole
MysqlDataTable: Change key to not be uniqe
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: MysqlDataTable: Change key to not be uniqe
If a column is just a unique column, add the following line:
Replace "Column name" with the name of the unique column.
If a column is a primary key, it is added to the PrimaryKey collection of the MySqlDataTable object. Then add the following code:
Code: Select all
mySqlDataTable.Columns["Column name"].Unique = true;
If a column is a primary key, it is added to the PrimaryKey collection of the MySqlDataTable object. Then add the following code:
Code: Select all
mySqlDataTable.PrimaryKey = null;[code]
Re: MysqlDataTable: Change key to not be uniqe
Perfect!! Thanx:-)