I have a query like this
@"SELECT
TABLE_NAME
AS
开发者_JAVA百科 TABLES
FROM
INFORMATION_SCHEMA.TABLE_CONSTRAINTS
WHERE
CONSTRAINT_TYPE = 'PRIMARY KEY'
AND
TABLE_NAME <> 'dtProperties'
ORDER BY
TABLE_NAME";
this gives the list of all table names that have primary key in a rich textbox control
Now I want to add something like "Here are the lists of tables that have primary keys...followed by the table names.
Is there anyone who will guide me....
You can use Union to add your string.
First declare string and assign what u want like "Here are the lists of tables that have primary keys" and using data reader U read each value and add it to that.After that assign that string to rich text box text.
add it in string by string s=s+"\n"+dataReader[0];
精彩评论