开发者

How to add strings before the table gets bind in the rich text box control

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];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜