Update not working

Results 1 to 2 of 2

Thread: Update not working

  1. #1
    Join Date
    Dec 1969

    Default Update not working

    Hi everyone,<BR><BR> <BR><BR>I must be brain dead today because I can&#039;t seem to find why my Update isn&#039;t working. None of my parameters seem to be passing to my stored procedure. I put break points at each line in VS where I&#039;m trying to pass a value to my parameter but they come up as empty strings. Here&#039;s my code, I really must be brain dead because I can&#039;t see it. Any help would be appreciated, here&#039;s my code.<BR><BR> <BR><BR>Private Sub InsertRecord()<BR><BR> &#039;Updates UserData Table<BR><BR> Dim storedParams(6) As SqlParameter<BR><BR> Dim pilotinfo As Integer<BR><BR> pilotinfo = Request.QueryString(name)<BR><BR> Dim spName As String<BR><BR> spName = "EGLUpdateAdmin"<BR><BR> <BR><BR> &#039;Get Param info<BR><BR> storedParams =<BR>SqlHelperParameterCache.GetSpParameterSet(str Conn, spName)<BR><BR> &#039;Set Param values<BR><BR> storedParams(0).Value = pilotinfo<BR><BR> storedParams(1).Value = txtAnswer.Text.Trim<BR><BR> storedParams(2).Value = lblDueDate.Text.Trim<BR><BR> storedParams(3).Value = ddlPriority.SelectedItem.Value<BR><BR> storedParams(4).Value = txtNotes.Text.Trim<BR><BR> storedParams(5).Value = txtReviewedBy.Text.Trim<BR><BR> storedParams(6).Value = chkEmail.Checked<BR><BR> <BR><BR> SqlHelper.ExecuteNonQuery(strConn,<BR>CommandType. StoredProcedure, spName, storedParams)<BR><BR> End Sub<BR><BR>My connection string is declared as a global variable outside of this sub routine.<BR>

  2. #2
    Join Date
    Dec 1969

    Default I gather you are basing your code....

    ...on Visio and the helper classes, as described in this article:<BR><BR>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro03/html/sp03c10.asp<BR><BR>???<BR><BR>And DID you do step 3:<BR>Copy Microsoft.ApplicationBlocks.Data.dll to C:Inetpubwwwrootdata_dictionary<BR>??<BR><BR>*******************<BR><BR>I put break points at each line in VS where I&#039;m trying to pass a value to my parameter but they come up as empty strings.<BR><BR>You mean that form fields such as txtNotes.Text are empty??? Are you perhaps hitting this method *before* the fields are filled in?<BR><BR>Since you are using some of the PAG code from MS, I&#039;d ask the PAG group about it, if you can get someone there to answer.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts