Updating Access 2000 Records in .NET

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Updating Access 2000 Records in .NET

    Hi, I need some help. I have a on button click event that goes through a
    survey and reads the items they choose and then updates the current record.
    The problem I'm having is that nothing

    actually is written back to the database even though it runs the command
    even though an append query works just fine. any help would be appreciated.

    <script runat="server">

    Sub button_click(s as object, e as eventargs)
    dim conUpdate as OleDBConnection
    dim cmdUpdate as OleDBCommand

    Dim strInput as String = Session( "UniqueID" )
    Dim strSQL as String

    conUpdate = New OleDbConnection ( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
    SOURCE=d:\amcat\data\3001 eMortgage Survey.mdb" )
    strSQL = "Update Campaign Set q1=@q1, q2=@q2, q3=@q3, q4=@q4, q5=@q5,
    q6=@q6, q7=@q7, q8=@q8, q9=@q9, q10a=@q10, q10b=@q10b Where
    uniquekey=@uniquekey"
    cmdUpdate = New OleDBCommand( strSQL, conUpdate)
    cmdUpdate.Parameters.Add( "@uniquekey", strInput )
    'cmdUpdate.Parameters.Add( "@q1", aq1.Selectedvalue )
    'cmdUpdate.Parameters.Add( "@q2", aq2.Selectedvalue )
    cmdUpdate.Parameters.Add( "@q3", aq3.Selectedvalue )
    cmdUpdate.Parameters.Add( "@q4", atxtq4.Text )
    cmdUpdate.Parameters.Add( "@q5", aq5.Selectedvalue )
    cmdUpdate.Parameters.Add( "@q6", aq6.Selectedvalue )
    cmdUpdate.Parameters.Add( "@q7", aq7.Selectedvalue )
    cmdUpdate.Parameters.Add( "@q8", aq8.Selectedvalue )
    cmdUpdate.Parameters.Add( "@q9", aq9.Selectedvalue )
    cmdUpdate.Parameters.Add( "@q10", aq10.Selectedvalue )
    cmdUpdate.Parameters.Add( "@q10b", aq10b.Text )
    lblAlert.Text = strSQL
    conUpdate.Open()
    cmdUpdate.ExecuteNonQuery()
    conUpdate.Close()

    End Select
    End Sub

    thanks
    Nathan


    Nathan Guest

  2. Similar Questions and Discussions

    1. Updating Records ( Dreamweaver MX 2004, ASP & Access )
      hi there, I'm trying to update a record from a database but I don?t know how to do this from the new version because the behavior window it's...
    2. Updating Multi records
      Is there any way to update muliple records in one database table in one go?
    3. Updating database records in a datagrid
      In a datagrid, I read that you cannot add validation controls to the textboxes, you want to update, because they are using BoundColumns. I want to...
    4. Updating records when using a subform
      On Wed, 23 Jul 2003 12:39:22 -0700, "JohnL" <johnlaidlaw@nospamtalk21.com> wrote: <ftp.ipswitch.com>
    5. Updating Multiple Records
      I have a table in a database that contains all my photos. The fields are like Name, SRC, GalleryName, DateAdded, SpecialStyle. The only one you may...
  3. #2

    Default Re: Updating Access 2000 Records in .NET

    This is a classic asp newsgroup. While you may be lucky enough to find a
    dotnet-savvy person here who can answer your question, you can eliminate the
    luck factor by posting your question to an appropriate group. I suggest
    microsoft.public.dotnet.framework.adonet.

    HTH,
    Bob Barrows


    Bob Barrows Guest

  4. #3

    Default Re: Updating Access 2000 Records in .NET

    oops,

    thanks

    "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:#E13hITgDHA.3204@TK2MSFTNGP11.phx.gbl...
    > This is a classic asp newsgroup. While you may be lucky enough to find a
    > dotnet-savvy person here who can answer your question, you can eliminate
    the
    > luck factor by posting your question to an appropriate group. I suggest
    > microsoft.public.dotnet.framework.adonet.
    >
    > HTH,
    > Bob Barrows
    >
    >

    Nathan Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139