Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to run query at the back end

Author  Topic 

sqldev6363
Yak Posting Veteran

54 Posts

Posted - 2009-01-24 : 03:50:33
Hi,

i need help on,

From front end query will pass to the backend, how to run that query and how to give the result to the front end again?

For example, from front end they will type the query in text box "select top 10 * from employee". from back end we need to get that query into our table and we have to run that query in the back end and need to give the result to the fron end again.

Can any one help me out on this scenario

Thanks

dev

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-01-24 : 09:36:40
This depends on what you are using to create the front end. For example, if you are using C# or VB.Net, you can use ADO.Net. If you are using Excel, you can use an Excel macro with VBScript, and so on. Google to find examples.

For C# or VB.Net there is a sample here: http://msdn.microsoft.com/en-us/library/dw70f090.aspx
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-24 : 10:44:24
i dont think this is a good approach. you need to be careful against sql injection attcaks. why should you allow directly entering queries through webpage?
Go to Top of Page
   

- Advertisement -