开发者

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

开发者 https://www.devze.com 2023-01-30 11:30 出处:网络
I have a query like this @\"SELECT TABLE_NAME AS 开发者_JAVA百科TABLES FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS

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

精彩评论

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