none
No value given for one or more required parameters. RRS feed

  • Question

  • In a Web APP using ASP 3.5 and VB in Visual Studio 2005:
    Page has an SQLDataSource and FormView. SQLDataSource is connected to an Access DB
    Only using the FormView EditItemTemplate to change data in the selected record.
    When click on the template Update button, I get "No value given for one or more required parameters."
    I have double-checked the auto generated ASP code for the SQLDataSource UpdateCommand and UpdateParameters and can see no problems.
    Mind you, this is auto generated code.
    Any ideas?

    Sunday, January 31, 2010 2:54 PM

Answers

  • We would need to see the code for the SQL statement and the parameters you are using. This exception usually means that there is a column name or element in the statement that cannot be identified or associated with the table you are referencing.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, February 1, 2010 5:18 PM
  • Most likely some of the column names or the table name you have in your SQL statement uses reserved word. For example, if you have column names like NAME, DATE or so, then OLEDB provider cannot parse SQL statement properly because those words are reserved and to be able to use them as object names, you would need to enclose them into the square brackets or rename those columns. In a case of square brackets, you SQL statement would look something like

    UPDATE [MyTableNameHere] SET [MyColumnNameHere]=MyValueHere.......
    Val Mazur (MVP) http://www.xporttools.net
    Wednesday, February 3, 2010 11:29 AM
    Moderator

All replies

  • I think when you config the data source you will be asked to assign parameters from session, query or controls.
    I suggest you to visit forums.asp.net if you need more help in the System.Web namespace.


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Sunday, January 31, 2010 3:59 PM
  • We would need to see the code for the SQL statement and the parameters you are using. This exception usually means that there is a column name or element in the statement that cannot be identified or associated with the table you are referencing.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, February 1, 2010 5:18 PM
  • Most likely some of the column names or the table name you have in your SQL statement uses reserved word. For example, if you have column names like NAME, DATE or so, then OLEDB provider cannot parse SQL statement properly because those words are reserved and to be able to use them as object names, you would need to enclose them into the square brackets or rename those columns. In a case of square brackets, you SQL statement would look something like

    UPDATE [MyTableNameHere] SET [MyColumnNameHere]=MyValueHere.......
    Val Mazur (MVP) http://www.xporttools.net
    Wednesday, February 3, 2010 11:29 AM
    Moderator