Hello.

There is a sqlserver SQLQuery3.sql table with DECLARE @pcod varchar(30) , @mcode varchar(5) parameters.

It is necessary to display on its basis the report on the web form of visual studio 2010 C #. I have already created all the appropriate forms for the withdrawal, but I don’t understand how to write so that my table is displayed on the prepared form.

Can this be done, and if so how?
Thank.

Update

My task is based on a parameterized sql query to make a report on a web form in visual studio with #. Having looked at everything that I understood, I created a form with a report and a form in which the user would enter data (query parameter) and, accordingly, the necessary lines from my query are output with it. And now I'm trying to do it. I would have at least some structure of how this can be done or what needs to be read, since at the moment I do not understand anything.

  • @ Andy92, According to the rules of the forum, questions should not be limited to the decision or the completion of student assignments. Please clarify what you have done yourself and what did not work out. - Chad Nov.
  • @Chad, corrected comments. - Andy92
  • Try through the report master (ReportViewer), probably the easiest way! - SemSerios777

2 answers 2

You need:

  1. Get data from the table.
  2. Fill this form.

There is another option, as I recall:

  1. It to describe.
  2. To connect elements of the form with.

What exactly is not clear to you? I say right away, I will not write the code, I can only tell the concept.

  • Yes, to be honest, almost everything is incomprehensible to me. How, for example, to bind a table so that exactly what is specified in the parameter is displayed? - Andy92

There is clearly some terrible confusion in your head, which is why it is not very clear what exactly you have. SQLQuery3.sql is obviously not a table, but a certain file containing probably an sql query (possibly for creating this table itself)

DECLARE @pcod varchar (30), @mcode varchar (5) is clearly some piece of sql query taken out of context by which you cannot fully judge your data structure. Please, formulate your question more correctly, and, quite possibly, they will be able to help you.

Update

All of you are writing in some very general terms, too streamlined. Please write specifically what you need to do, what specific technologies / frameworks in question, describe the structure of your data, specify what exactly you have done and what specifically does not work. And the general formulations are good for students who are swimming in the exam and are trying to pull them into the top three.

  • Updated the question - Andy92
  • Already found the answer to your question. And, unfortunately, I did not have other formulations besides the general ones. - Andy92