User Profile

Collapse

Profile Sidebar

Collapse
programmher
programmher
Last Activity: Apr 1 '14, 10:45 PM
Joined: Jan 17 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Procedure or function has too many arguments specified - just two parameters

    I have a button that calls a delete stored procedure with only two parameters. I can run the stored procedure via SQL manager and know it works. But, when I call the stored procedure from a sqldatasource on the .aspx page I get this error: Procedure or function has too many arguments specified.

    Here is my code:

    Code:
    <asp:SqlDataSource runat="server" ID="sqlAuthorsInfo" ConnectionString="<%$
    ...
    See more | Go to post

  • programmher
    started a topic Changing path of .cs in Visual Studio

    Changing path of .cs in Visual Studio

    I have 5 classes in my assembly: Author.cs, Title.cs, DDSystem.cs, Genre.cs, and Request.cs.

    These are all part of my assembly named Libraries.Reque sts.


    The first four classes are saved to the correct location - c:\GCounty\

    Somehow, the last class got saved to the AppCode folder in my solution and was then compiled.

    I now have a Request.cs in two places, but the assembly is looking...
    See more | Go to post

  • Thatguy,
    There is an object datasource call on the page. It is here:
    Code:
    <asp:ObjectDataSource runat="server" ID="odsAuthorsDoc" SelectMethod="GetAuthorsDocByID" TypeName="Library.Media.AuthorDoc" UpdateMethod="UpdateAuthorsDoc">
            <SelectParameters>
                <asp:QueryStringParameter Name="RequestID" QueryStringField="id" Type="Int32"
    ...
    See more | Go to post

    Leave a comment:


  • Updating string values into custom data xml field

    This might belong in the XML forum, but I am trying here first.

    I have a variable named Authors. Sometimes I will insert one author into the database, sometimes more than one author will be inserted into the database.

    The page that performs the update is a .cs page. Here is the layout:

    Code:
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Data.SqlClient;
    ...
    See more | Go to post

  • programmher
    started a topic Searching xml field in stored procedure

    Searching xml field in stored procedure

    please see below code.


    I need to set mystring to equal whatever exists in the authors field. I am using this in a stored procedure. what I use to search on the field isn't working below but this isn't working when I try and set @mystring to that value.

    CData field has these values <fields>
    <ReqDate>1/28/2014</ReqDate>
    <ReqLibrary>Mai n</ReqLibrary>
    <Authors>Robb ,...
    See more | Go to post

  • The name does not exist in the current context

    I found this nifty code snippet and modified it with my values. Getting this error now: The name cblAuthorsList does not exist in the current context. Confused why since this is on my page. How do I resolve this error?


    Code:
    private void FindAllOfMyString(string searchString)
    
        {
            // Set the SelectionMode property of the ListBox to select multiple items.
            cblAuthorsList.SelectionMode
    ...
    See more | Go to post

  • Assigning value to @cmd gets error - Incorrect syntax near '/'.

    This works:

    Code:
    SELECT CData.value('(/fields/Genres)[1]', 'varchar(255)')FROM Categories WHERE ReqNum = 9281
    This does not:

    Code:
    DECLARE @cmd varchar (1000)
    SET @cmd = 'SELECT CData.value('(/fields/Genres)[1]', 'varchar(255)')FROM Categories WHERE ReqNum = 9281'
    I get this error: Incorrect syntax near '/'.

    How do I resolve this e...
    See more | Go to post

  • Splitting comma delimited results into rows

    Here is my code:
    Code:
    SELECT CData.value('(/fields/Genres)[1]', 'varchar(255)')FROM Categories WHERE ReqNum = 9281
    Here are my results:
    Code:
    King, Saul, Robb
    I need the results to display like this:

    Code:
    King
    Saul
    Robb
    How do I modify my script so my results display in rows instead of the comma delimited fields?
    See more | Go to post

  • Creating a comma delimited list of values to pass from .aspx to .cs

    What I need to do:
    If a library user selects several categories (like Fiction, Nonfiction, Biography) from a checkbox list, I need to pass all of those selected values from my .aspx page to my .cs page.

    My code on my .aspx page:

    Code:
    if (cblGenres.SelectedIndex != -1)            
                foreach (ListItem cbListItem in cblGenres.Items)
            {
                if (cbListItem.Selected)
    ...
    See more | Go to post

  • Thanks Luk3r! That gave me what I needed.
    See more | Go to post

    Leave a comment:


  • Text Box Needs to Display the Selection from the Dropdown Box

    I need my text box or some text somewhere on my form to display the value selected from my dropdown box.

    Example - if an Author's genre of Fiction is selected, the textbox should display Fiction. How do I do this?

    I can not use the PageLoad event because that event hides some other fields on the page. I think I need to include something in the selectedindexch ange event.

    Here is my code:
    ...
    See more | Go to post

  • I ran debugger and no issues were detected.

    Here is the active directory code and the code that populates the dropdown boxes.

    I find it very odd that using the same object source yields two different results, though. The results from the dropdown box are also very inconsistent. Either all of the members from the active directory groups should display or none of the members from the active directory groups display- not...
    See more | Go to post
    Last edited by Frinavale; Jan 24 '14, 06:51 PM.

    Leave a comment:


  • programmher
    started a topic Active Directory - Dropdown vs. Grid Oddity

    Active Directory - Dropdown vs. Grid Oddity

    I have a page that another developer wrote that displays an Active Directory group list in a gridview. If you click the select link, the members of the selected group display in another grid.

    I have another page that uses the same datasources and displays the Active Directory groups in a dropdown box. If you select a particular group, the members of that group display in a listbox.

    The strange thing is - for some reason...
    See more | Go to post

  • Binding List Box to Two Different Drop Down Boxes

    I need to bind my list box to two different drop down boxes. How do I bind my second dropdown box so my list box is populated with the author's name selected from my lbAuthorsList like it does when authors are selected from the lbGenrelist?

    My code:

    Code:
    asp:DropDownList runat="server" ID="lbAuthorsList" style="float:left;" 
            DataSourceID="AuthorsList" DataTextField="DisplayName"
    ...
    See more | Go to post

  • I found this on Stackoverflow. It might help:

    Is the database in your bin directory? Is it also part of your project? I have seen this happen when every time you build it overwrites the database in your bin directory with the one from the project directory, so it appears things are not getting saved.

    --- To view any and all changes to your DB via application use this one When you initially add the DB to the project,...
    See more | Go to post

    Leave a comment:


  • programmher
    started a topic Second button does not work

    Second button does not work

    I have two drop down boxes and one list box. My client wants the patrons to either search for authors from a drop down box that lists all the authors or from the list box that displays a list of authors based on the genre. The individual authors add button does not work. I get an error message that states: Exception has been thrown by the target of an invocation.

    Here is my code:

    Code:
    protected void AddAnAuthor(object
    ...
    See more | Go to post

  • I am updating code another programmer (who left the company) wrote. The existing code uses a stored procedure. The project manager said she wants to keep it as a stored procedure instead of a SQL statement.
    See more | Go to post

    Leave a comment:


  • I tried modifying my code to the below but am still unable to insert multiple values:
    Code:
     protected void addAuthors_button(object sender, EventArgs e)
        {
            AddAuthors_ds.Insert();
            StringCollection sc = new StringCollection();
            foreach (ListItem item in AuthorsList.Items)
            {
                if (item.Selected)
                {
    
                     AddAuthors_ds.InsertParameters.Clear();
    ...
    See more | Go to post

    Leave a comment:


  • Unable to successfully submit a list of authors from listbox

    I need to add either one author or a list or array of authors to my sql table. Here is the code that is used to insert the authors into the table:

    The code from the listbox:

    Code:
    <asp:ListBox runat="server" ID="AuthorList" DataTextField="AuthorName" 
                DataValueField="AuthorName" DataSourceID="Authors"  SelectionMode="Multiple"/>
    ...
    See more | Go to post
    Last edited by Rabbit; Jan 17 '14, 09:36 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
No activity results to display
Show More
Working...