User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 426,020 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,672 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2734 | Replies: 2
Reply
Join Date: Mar 2005
Posts: 3
Reputation: squeakerz83 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
squeakerz83 squeakerz83 is offline Offline
Newbie Poster

need help creating user defined SQL statement

  #1  
Apr 19th, 2005
hi guys i've posted this on both the SQL and ASP.Net forums cause i ain't sure which one i should use so sorry about clogging up the message board.

Basicly i'm a newbie with ASP.net and i was looking for somw help with this query

i got a site and as part of the functionality i need to create a page where the user can create their own SQL statements to query a database (obc one thats connected to the web page). I got fairly basic knowledge when it comes to asp.net but i know how to access stored procedures and basic DB conectivity, but i've know idea how to do it when the user is meant to define the whole query from multiple tables (if possible) i know its asking a lot but any advice no matter how small would be appriciated...oh and while i remember its an Access DB im connecting to.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: need help creating user defined SQL statement

  #2  
Apr 20th, 2005
That's a very bad idea. A user could craft any statement they like? They could wipe out the entire database.

Your question is a bit too general to give a meaningful answer. Give them a textarea, and pass in what they type as the value of the CommandText property.
Reply With Quote  
Join Date: Feb 2003
Location: Canada
Posts: 786
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Rep Power: 9
Solved Threads: 25
Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: need help creating user defined SQL statement

  #3  
Apr 21st, 2005
tgreer
Is 100% correct. What you are asking is dangerous and breaks the rules of n-tier application development.

But as tgreer mentioned, please provide more information, because what you are asking is not very clear, in the sense of why would you ever give such control to an end user?


Originally Posted by tgreer
That's a very bad idea. A user could craft any statement they like? They could wipe out the entire database.

Your question is a bit too general to give a meaningful answer. Give them a textarea, and pass in what they type as the value of the CommandText property.
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 1:35 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC