[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

asp.net - accessing a web control wizard remotely to see the query...

Posted on 2011-10-11
13
Medium Priority
?
168 Views
Last Modified: 2012-06-27
So I am used to working with vb.net in a small environment ...where I work right on the server...with the web server and db on the same server....not Im in a larger situtaion where I am working with source control...and inherited a project...

so I check out the web form and code behind and now I want to see how a gridview wizard is pulling  data from the db, what query it is using...in my old situation I could go out to the server and look at the wizard and see how the smart tag is running...but now I dont have access to that directly...is this something I need to in source control?
0
Comment
Question by:GlobaLevel
  • 7
  • 6
13 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36949398
Does your project not have all the source code?
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 36949444
yes....I do have access to it all...

  Total Shoes - ALL sizes</h3>
                            <asp:GridView ID="gvTotalShoes" runat="server" AutoGenerateColumns="False"
                                CellPadding="4" BorderWidth="1px" Width="400px" DataSourceID="dsTotalShoes"
                                ShowHeader="False">
                                <AlternatingRowStyle CssClass="gridalternate" />

I want to see what dsTotalShoes is....to see how it queries the data...but when I go out to the design view...I get an error : Error Creating Control"

so I can't get into the smart tag to see how the data is configured...theres nothing I can see in the code behind...
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 36949453
we are using Surround SCM...where do I need to go to view it?
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36949546
dsTotalShoes is probably a SQLDataSource within the aspx file itself. Did you do a search for it?
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 36949639
yes, and I found it here..in the aspx...looks like its coming in through a dataset....where would I go from here...to find this...and see the actuall query string...that runs against the SQL DB...

       <asp:ObjectDataSource ID="dsTotalShoes" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="ManagementDataSetTableAdapters.TotalShoesTableAdapter">
                    <SelectParameters>
                        <asp:Parameter Name="RptType" Type="Int32" DefaultValue="5" />
                    </SelectParameters>
                </asp:ObjectDataSource>
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36949713
Its using an ObjectDataSource. From here, goto GetData method and see what code is in there. I suspect there is some sort of object relational mapping going on.
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 36949752
so the GetData method could be in the code behind on any page..right...theres hundred of pages...which means searching each page individually...thought there would be a better/faster way.....
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36949801
>so the GetData method could be in the code behind on any page
It would be in the codebehind of the current page.
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 36949946
its not in the code behind of this page...its a nested page....so there are headers at top and you click a header and and then select the the tabe for this page...maybe if I do a search for 'ManagementDataSetTableAdapters.TotalShoesTableAdapter' in the code behind...
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36949993
Search for that as well as for GetData method.
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 36950459
wow..found it...pulls from a .xsd file...

 <MainSource>
              <DbSource ConnectionRef="ShoeConnectionString (Web.config)" DbObjectName="QIPS.dbo.rptShoeReporting" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a25125632" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>dbo.rptShoeReporting</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@RptType" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 36950515
CodeCruiser...


I checked the stored procedure....

dbo.rptShoeReporting


this sproc needs 4 parameters to run...how can the web app trigger this sproc..when no parameters are being passed...?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 36951517
Well there are two parameters being specified in the xsd above. And the ObjectDataSource is only supplying the rpttype parameter so I guess either the other parameters have default values or they are being supplied with null values.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question