VDN - Primary Key Constraint & Boolean Fields Question

Johnny Harris johnny at southshore.com
Sun Mar 30 08:37:34 CDT 2014


Ivan,

That was the problem with the UpdateMethod. It was readonly.
I added the parameters to SQLSelect so the cursor would be readwrite/server side.

The update completes successfully now.


Thank You,

Johnny Harris

From: Johnny Harris 
Sent: Sunday, March 30, 2014 8:33 AM
To: Valentina Developers 
Subject: Re: VDN - Primary Key Constraint & Boolean Fields Question

Below is the code I used to test the Cursor.UpdateMethod. I was trying to update the one field only.
I might not be doing it correctly as I always use the SQLExecute method. 

I updated to version 5.5.5b1 yesterday on my development server which is Ubuntu 12.04. 



Dim cur As VCursor
If mData.OpenDatabase Then

    cur = mData.db.SqlSelect("SELECT * FROM support_payments WHERE pk = '" & Me.Key & "'")

    Try

        cur.Field("payment_amount").Value = Me.PaymentAmount
        cur.UpdateRecord()
        mData.CloseDatabase()
        cur = Nothing

    Catch ex As VException

        If ex.ErrorCode > 0 Then
            MsgBox(ex.ErrorCode)
            MsgBox(ex.Message)
        End If

        _err_msg = ex.Message

    End Try
Else

    _err_msg = "Connection Error: " & mData.ErrorMessage

End If

If _err_msg = “” then
    return true
Else
    return false
End If


From: Ivan Smahin 
Sent: Sunday, March 30, 2014 8:17 AM
To: Valentina Developers 
Subject: Re: VDN - Primary Key Constraint & Boolean Fields Question


On Mar 30, 2014, at 4:04 PM, Johnny Harris <johnny at southshore.com> wrote:


  Ivan,

  It appears that I can update a record as long as I don’t try to update the is_void (BOOLEAN) field.

  If I remove that field from my sql query, I can update the record all I want. As soon I add it back to the query string... I get the error.


Could you be more specific and show me the code - how do you do this in particular?


  I also tried updating the record using the cursor.UpdateRecord method but get the error code 353536. The error message associated
  with the error code is blank, so I’m not sure what the error code means.


It is 0x56500 

//Cursor "%S" is read only.
DECLARE_ERROR( ERR_CURSOR_READONLY                                         , 0x56500);

Description absence is fixed for windows recently - do you run latest vKernel version?


-- 
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com




--------------------------------------------------------------------------------
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina



--------------------------------------------------------------------------------
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20140330/67705681/attachment-0001.html>


More information about the Valentina mailing list