<< split from http://www.daniweb.com/forums/thread213753.html >>

Welcome hassanfaraz,
I think you need this,
SQL CREATE VIEW Statement
Query SQL View

i have another problem that is i want to restrict my code with alphabets and alphanumeric. for restricting alphabets i am using

nt ascii = e.KeyChar;
            if ((ascii < 65 || (ascii > 90 && (ascii < 97 || ascii > 122))))
                e.Handled = true;

            if (ascii == 13)
                txtname.Focus();

this restricts to only alphabets and moreover i am using

int ascii = e.KeyChar;
            if (ascii < 46 || ascii > 57)

                e.Handled = true;

            if (ascii == 13)
                txtempid.Focus(); for alphanumeric.

could you please tell me if i want only allow to enter alphabets and alphanumeric???

Hi,

You could use

Char.IsLetterOrDigit(keyChar)

Maybe this code will help:

while(true)
            {
                ConsoleKeyInfo keyInfo = Console.ReadKey(true);

                char keyChar = keyInfo.KeyChar;

                if (Char.IsLetterOrDigit(keyChar))
                    Console.WriteLine(keyChar + " is a letter or a digit.");
                else
                    Console.WriteLine(keyChar + " is a NOT letter NOR a digit.");

                if (keyInfo.Key == ConsoleKey.Escape)
                    break;
            }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.