AHSAN111
Posts
-
Getting unique combination of rows in SQL?? -
how to take a table name from a text box!As I said, you need to use a validator to ensure that only allowable table names are used to construct the query. You can use javascript + regex or .net validation controls as it suites you.
-
how to take a table name from a text box!the dropdown list would eliminate the facility of having tablenames according to user choices. This IMO is essential if we are dealing with a SQL Parser or a simillar application, or a situation where we need user-specified entity names in the database. We can use a textbox and employ reguler expressions / validation controls in order to eliminate the possibility of an incorrect tablename.
-
how to take a table name from a text box!why did u downvote ?? please explain :)
-
how to take a table name from a text box!Try the following:
string q = "create table " + Textbox1.text + "(enum number,ename varchar2(10),sal number)";
a better way (cleaner and easily readable) of doing it would be to use a local string variable to store the table name from the text box and concatenate the string using that variable.
string temp = Textbox1.Text;
string q = "create table "+temp+ " (enum number,ename varchar2(10),sal number)";