Results 1 to 6 of 6

Thread: [RESOLVED] Unable to Change Property

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Location
    Fairfax, VA
    Posts
    24

    Resolved [RESOLVED] Unable to Change Property

    I am trying to allow changes to our database through a timecard program. We use and Image database and I am using VS 2008. I am getting the error: (MDMDA) Unable to change property. The trouble shooting tip tell me "check the error code property of the exception to determine the HRESULT returned by the COM object." The error line is in bold.




    If Not Trim(frmMantime.txtFunc1.Text) = "" And Not frmMantime.txtRec1.Text = "" Then
    'Update Record
    lngRecordNumber = frmMantime.txtRec1.Text
    If ShopClock.ReadDirect(lngRecordNumber, "@") Then
    ShopClock.item("FUNC-CODE") = frmMantime.txtFunc1.Text
    ShopClock.item("START-TIME") = frmMantime.txtClock1.Text

    If ShopClock.DBUpdate(1, "@") Then
    MsgBox("Record was successfully Updated", MsgBoxStyle.OkOnly)

    Else
    MsgBox("Failed to update Record", MsgBoxStyle.OkOnly)

    End If

  2. #2
    Fanatic Member
    Join Date
    Aug 2009
    Posts
    540

    Re: Unable to Change Property

    1.) what is ShopClock exactly?
    2.) Does this ShopClock object have a value property? (ie would ShopClock.Item("START-TIME").Value = frmMantime.txtClock1.Text work?)
    Where I'm from we only have one bit of advice for new comers: "If you hear banjos, turn and run".


    VS 2008 .NetFW 2.0

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Location
    Fairfax, VA
    Posts
    24

    Re: Unable to Change Property

    1.) ShopClock is an object that was created to reference the "Shop-Clock" Database.

    2.) When I add .Value onto the end of ShopClock.item("START-TIME") it returns "Public member 'Value' on type 'String' not found."

  4. #4
    Fanatic Member
    Join Date
    Aug 2009
    Posts
    540

    Re: Unable to Change Property

    Ok, so I'm assuming then that the ShopClock.("XYZ") lines represent individual fields within this database, and this ShopClock object is a created class or is it just an object variable?
    Where I'm from we only have one bit of advice for new comers: "If you hear banjos, turn and run".


    VS 2008 .NetFW 2.0

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Location
    Fairfax, VA
    Posts
    24

    Re: Unable to Change Property

    You are correct, it is individual fields within the "SHOP-CLOCK" database.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Location
    Fairfax, VA
    Posts
    24

    Re: Unable to Change Property

    I figured it out. The database is formatted as "hhmm" and I completely forgot to reformat the time from hh:mm. Thanks for your help.

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