CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1

    Simple...? How do I make a recordset updatable?

    How do I make a recordset updatable?
    I need to specify something when i 'Open' the recordset...?
    Tell me what to do!
    /Peter


  2. #2
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    Re: Simple...? How do I make a recordset updatable?

    If u would to use Update function first u must call first AddNew or Edit function.
    If there anything else u want please say more detalied

    Regards,
    Ovidiu


  3. #3

    Re: Simple...? How do I make a recordset updatable?

    Well, when I'm using this line to open the recordset...Don't I have to tell the 'Open' statement that the recordset is updatable?

    recset.Open(CRecordset::snapshot,sSql/*,Don't I have to specify something here*/);



    And then after this I will have something like this:

    sSql = "INSERT INTO HMDVAR (1,2) VALUES ('first','second')";
    db.ExecuteSQL(sSql);



    /Peter


  4. #4
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    Re: Simple...? How do I make a recordset updatable?

    No u don't nedd. But if u want to see changes made it by

    db.ExecuteSQL( sSql );




    u must do this:

    recset.Requer();




    Let me know if this help u
    Regards,
    Ovidiu


  5. #5
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    Re: Simple...? How do I make a recordset updatable?

    No u don't nedd. But if u want to see changes made it by

    db.ExecuteSQL( sSql );




    u must do this:

    recset.Requery();




    Let me know if this help u
    Regards,
    Ovidiu


  6. #6

    Re: Simple...? How do I make a recordset updatable?

    When I execute the program this error is shown: Operation must use an updatable query.

    And,..when I make a test:

    if (recset.CanUpdate())
    {
    MessageBox("It can Update!");
    }



    ...well, I'm not shown any messagebox!?
    Further suggestions?


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