CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    2

    Read but not Update Access Database

    From within a C# application, I am using a database writer class to write to and from a Microsoft Access database. For some reason, the Read method works, but not Update.

    Read sends the following command:

    SELECT * FROM tblInspection WHERE ID = @ID

    While Update sends:

    UPDATE tblInspection SET [templateID]=[@templateID],[propertyID]...[@imageCount],[dTime]=[@dTime] WHERE [ID]=[@ID]


    I've checked many times to make sure the syntax and parameters are correct. When I call ExecuteNonQuery, zero rows are returned from the Update (and the database is not changed), but when I Read, the object is returned no problems. Does anyone have an idea about what I'm doing wrong?

    Thanks in advance.

  2. #2
    Join Date
    Mar 2009
    Posts
    2

    Re: Read but not Update Access Database

    I should add that when I plug these queries into the Microsoft Access engine through openoffice.org base they both work fine. =[

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured