Setting Paramaters while Connecting to a SQLDatasource

Last post 07-23-2008 9:31 AM by bulsd. 5 replies.

Sort Posts:

  • Setting Paramaters while Connecting to a SQLDatasource

    07-17-2008, 10:58 AM
    • Loading...
    • bulsd
    • Joined on 05-13-2008, 12:12 PM
    • Mason City, IA
    • Posts 8

    I've done this before, but in the last month something has happened.  I had designed a simple web app and had it connected to multiple sql connections.  And the app still works right.  But i can't change any input parameters.  Then I Select the pull down menu for Control, cookie, Form, QueryString, etc, it automatically defaults to whatever was there to begin with.  I Doesn't do it in just 2005, but also visual web developer 2008 as well.   I am trying to create a new webapp and it makes it a little difficult to do it when i can't assign parameters cause the default is None.  Any help is appreciated. 

  • Re: Setting Paramaters while Connecting to a SQLDatasource

    07-21-2008, 4:32 AM

    Hi,

    I don't exactly understand you basing on description above. Did you want to set the parameter for your DataSource control? If so, you can follow Using Parameterized Queries with the SqlDataSource (http://www.asp.net/learn/data-access/tutorial-48-cs.aspx).

    I understand that this may not be information you want. However, if you need more information, please clarify in detail. It will help us move more quickly toward a solution.


    I look forward to receiving your test results.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Setting Paramaters while Connecting to a SQLDatasource

    07-22-2008, 9:55 AM
    • Loading...
    • bulsd
    • Joined on 05-13-2008, 12:12 PM
    • Mason City, IA
    • Posts 8

    The link is the problem i am having.  If you go to Fig 5 on the page you linked, you will see the Configuration tool.  If i use the Pull down to select a control, form, cookie, session, doesn't matter.  It doesn't work, it automatically resets what i choose to None.  This is my problem.  I've used VS 2005 before, and it doesn't matter. I've opened a project i created 2 months ago, and i could/had set all of the parameters there, and everything worked, but now, i can't change the parameters i set then.  So this is my problems.  I can build, deploy, create, and use until i want to use anything related to a data source, and then it all goes down hill. I have a whole collection of addins and extras that have been used by the previous employee who used a lot of this stuff for our current websites, and i really don't want to delete/remove the collection if i don't have too.

  • Re: Setting Paramaters while Connecting to a SQLDatasource

    07-22-2008, 9:49 PM
    Answer

    Hi,

    Thanks for your response.

    You can try to set the parameter in the DataSource's markup to see if it works. For example, I set a parameter using QueryString:

            <SelectParameters>
                <asp:QueryStringParameter Name="id" QueryStringField="ID" />
            </SelectParameters>

    If we disable Add-ns (“Tools” | “Add-in Manager”), do we still have the problem? This can eliminate the possibility that third party Add-ins are causing problems.

    You also can try to run devenv /resetsettings or devenv /setup in Visual Studio Command Prompt.

     

    I look forward to receiving your test results.

     

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Setting Paramaters while Connecting to a SQLDatasource

    07-23-2008, 6:42 AM

    Currently I am marking this thread as “Answered”, if my reply does not help you resolve the problem, please feel free to unmark it. Please also provide the more information and we will be glad to follow up.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Setting Paramaters while Connecting to a SQLDatasource

    07-23-2008, 9:31 AM
    • Loading...
    • bulsd
    • Joined on 05-13-2008, 12:12 PM
    • Mason City, IA
    • Posts 8

     I figured out how to set the parameters yesterday AM, so in all honesty, its working, but it still hasn't fixed my problem.  I just got word of your posts this morn around 7am, so i havent' had time to try the reset.  I'm kinda in the middle of a big project, and this is where it is causing me problems.

Page 1 of 1 (6 items)
Microsoft Communities
Page view counter