SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


how to put my sql request within an application to disaply result?


how to put my sql request within an application to disaply result?

Author
Message
asco5
asco5
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 30
Hi i have some request i would like to put them in one application so it's can display all the result instead of going each time to the database

Do you have any example how to put my request?is it vb programming?visual studio?
can someone give me a tutorial or example of a application?

thanks
david.alcock
david.alcock
Mr or Mrs. 500
Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)

Group: General Forum Members
Points: 523 Visits: 1195
Might get you started...

http://www.dotnetperls.com/sqlclient

'Only he who wanders finds new paths'
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27134 Visits: 17557
Your question is unclear. Are you trying to create an application that will dynamically display the results of a query?

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
asco5
asco5
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 30
Sean Lange (2/25/2013)
Your question is unclear. Are you trying to create an application that will dynamically display the results of a query?


Hi exactly

In fact instead of going to sql management studio and execute a new request everytime

i would like to put a list of request in a application and execute the request by pressing a button it will display the resulat

but all my queries are counting
for example how many poeple i have in my database i click on the button it 's shows 100

simple things, instead of going to the sql studio and executing the request and opening a new frame for each request etc...


thanks
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27134 Visits: 17557
asco5 (2/25/2013)
Sean Lange (2/25/2013)
Your question is unclear. Are you trying to create an application that will dynamically display the results of a query?


Hi exactly

In fact instead of going to sql management studio and execute a new request everytime

i would like to put a list of request in a application and execute the request by pressing a button it will display the resulat

but all my queries are counting
for example how many poeple i have in my database i click on the button it 's shows 100

simple things, instead of going to the sql studio and executing the request and opening a new frame for each request etc...


thanks


Your issue is still very vague but basically you can create a stored proc, then create an application that calls that stored proc and displays the results.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
asco5
asco5
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 30
Sean Lange (2/25/2013)
asco5 (2/25/2013)
Sean Lange (2/25/2013)
Your question is unclear. Are you trying to create an application that will dynamically display the results of a query?


Hi exactly

In fact instead of going to sql management studio and execute a new request everytime

i would like to put a list of request in a application and execute the request by pressing a button it will display the resulat

but all my queries are counting
for example how many poeple i have in my database i click on the button it 's shows 100

simple things, instead of going to the sql studio and executing the request and opening a new frame for each request etc...


thanks


Your issue is still very vague but basically you can create a stored proc, then create an application that calls that stored proc and displays the results.



hi thanks for your reply
this is a example of what i want to do
as you see i have my data base and i have my application
i would like to add all my sql request in my application and add a button to execute all the request and shows the result
Attachments
EXEMPLE.gif (13 views, 59.00 KB)
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27134 Visits: 17557
asco5 (2/26/2013)

hi thanks for your reply
this is a example of what i want to do
as you see i have my data base and i have my application
i would like to add all my sql request in my application and add a button to execute all the request and shows the result


OK so again here are the steps.

1) Create a stored proc that retrieves your data. (or maybe more than 1 stored proc)
2) Call this stored proc from your application.
3) Display the results in your application.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
asco5
asco5
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 30
Sean Lange (2/27/2013)
asco5 (2/26/2013)

hi thanks for your reply
this is a example of what i want to do
as you see i have my data base and i have my application
i would like to add all my sql request in my application and add a button to execute all the request and shows the result


OK so again here are the steps.

1) Create a stored proc that retrieves your data. (or maybe more than 1 stored proc)
2) Call this stored proc from your application.
3) Display the results in your application.



Hi thanks for your useful reply

But i m beginner i know that i have to store all my proc, and call from my application and display the result
but how?can i have 1 exemple of 1 proc how it's done so i can work on it to do all the rest of my requests?

thanks
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27134 Visits: 17557
asco5 (2/27/2013)
Sean Lange (2/27/2013)
asco5 (2/26/2013)

hi thanks for your reply
this is a example of what i want to do
as you see i have my data base and i have my application
i would like to add all my sql request in my application and add a button to execute all the request and shows the result


OK so again here are the steps.

1) Create a stored proc that retrieves your data. (or maybe more than 1 stored proc)
2) Call this stored proc from your application.
3) Display the results in your application.



Hi thanks for your useful reply

But i m beginner i know that i have to store all my proc, and call from my application and display the result
but how?can i have 1 exemple of 1 proc how it's done so i can work on it to do all the rest of my requests?

thanks


Let's use the first of your outputs "how many person who have 100 MARKS"

To make this a little more flexible we will use a parameter.

Something like this:


create proc GetHighMarks
(
@MarkMin int
) as
select count(*) from YourTable
where Marks >= @MarkMin



_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search