|
-
Mar 17th, 2010, 10:05 AM
#1
Thread Starter
Junior Member
[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
-
Mar 17th, 2010, 10:19 AM
#2
Fanatic Member
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
-
Mar 17th, 2010, 10:26 AM
#3
Thread Starter
Junior Member
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."
-
Mar 17th, 2010, 10:35 AM
#4
Fanatic Member
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
-
Mar 17th, 2010, 10:38 AM
#5
Thread Starter
Junior Member
Re: Unable to Change Property
You are correct, it is individual fields within the "SHOP-CLOCK" database.
-
Mar 17th, 2010, 10:49 AM
#6
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|