1 Replies - 1763 Views - Last Post: 10 October 2012 - 02:28 PM Rate Topic: -----

#1 TRB  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 09-October 12

Query the same data for use in diferent controls.

Posted 09 October 2012 - 05:56 PM

Hi,
I am only just starting out in programming and cannot figure out how to filter the same data in diferent ways for use on the same form in seperat controls.

For example
I want to return the results where column 1 "Name" = txtBox1.Text And Colume 5 "Date" = a date selected on a month calander control for use in one "DataGridView" control and at the same time,

return the results where column 1 "Name" = txtBox2.Text And Colume 5 "Date" = the same date selected on a month calander control for use in another "DataGridView" control.

I require around 10 different queries and "DataGridView" combanations to run at the same time.

Each query should only return a maximum of 12 results.


Is this possible or do I need to try something else??

Thanks
TRB

Is This A Good Question/Topic? 0
  • +

Replies To: Query the same data for use in diferent controls.

#2 e_i_pi  Icon User is offline

  • = -1
  • member icon

Reputation: 789
  • View blog
  • Posts: 1,676
  • Joined: 30-January 09

Re: Query the same data for use in diferent controls.

Posted 10 October 2012 - 02:28 PM

If you're strictly using SQL, then I would suggest using a Stored Procedure to achieve this. A Stored Procedure is like a function for a database.

If you're using a regular programming language to access the database, then you can still used Stored Procedures, but depending on your database engine and programming language there may be other options, such as prepared statements or paramterised datasets.

This post has been edited by e_i_pi: 10 October 2012 - 02:28 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1