Computing.Net > Forums > Web Development > Querying an Gridview using a textbo

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Querying an Gridview using a textbo

Reply to Message Icon

Name: michael2009
Date: February 18, 2009 at 13:02:28 Pacific
OS: Windows XP
Subcategory: Javascript/Ajax
Comment:

Hi i' new C# programming and i am trying to create an SQL command viewer same as ISQL * Plus using Visual Studio 2005 in C# Baicially querying a gridview using SQL statements via a textbox

I have a database created using SQLDataSource which is called customer. It contains ID, firstname, surname, address. This is linked to a Gridview which display the information within the database.

Want i want is to bind the textbox some how to the database or Gridview so when the user type in any SQL command/statement via the textbox such as "SELECT firstname from Customer; or "INSERT INTO customer(firstname,surname,adress) VALUES ('Alan','Smith','Boston') It will show the results in the Gridview.

However, i want some type of validation to ensure the SQL command entered by the user is correct and is shown to the user.For example In a form of an error message on the web page stating either correct or incorrect if they miss out the ; <-- (cant remember what you call it again)

I would also like to expand this by allowing the user to create a database using the text box and perform othe SQL statement such as SQL ORDER BY, SQL DELETE, SQL UNION,SQL GROUP BY etc



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Suggest some Free Java Ho... Adding Border to Image ov...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Querying an Gridview using a textbo

How to add an Image to a database www.computing.net/answers/webdevel/how-to-add-an-image-to-a-database/2147.html

use form fields to add to a url? www.computing.net/answers/webdevel/use-form-fields-to-add-to-a-url/203.html

PHP and using sessions www.computing.net/answers/webdevel/php-and-using-sessions/2527.html