I’m trying to update , delete or insert in the grid view
And everytime I try to insert data into the grid keep getting this error
I have the FieldName property for each text field to its corresponding field in the database
when i remove the update event from the code it still saves it is there something that i am missing ???
Thanks
Private Sub SafGrid1_LineChkEvent(ByRef Action As System.Int16, ByRef MaintFlg As System.Int16, ByRef RetVal As System.Int16) Handles SafGrid1.LineChkEvent
Dim sqlstr As String Dim key As String Dim buffer As Byte() = Encryption(cNumber.CtlText, key) Dim EncryptedData As String = Convert.ToBase64String(buffer) sqlstr = "select * from xCreditCard where custid = " & SParm(cCustID.CtlText) & " AND cardnumber = " & SParm(EncryptedData) serr1 = SqlFetch1(CSR_Credit, sqlstr, bxCreditCard) If serr1 = NOTFOUND Then Found = False bxCreditCard = nxCreditCard Else Found = True End If End Sub Private Sub Update1_UpdateEvent(ByVal Level As Short, ByVal InsertFlg As Short, ByVal LevelsDone As Short, ByVal LevelsLeft As Short, ByRef RetVal As Short) Handles Update1.UpdateEvent If Level = Finished Then Call TranBeg(True) Dim key As String Dim buffer As Byte() = Encryption(cNumber.CtlText, key) Dim EncryptedData As String = Convert.ToBase64String(buffer) bxCreditCard.cardNumber = EncryptedData If Found = True Then SUpdate1(CSR_Credit, "XCREDITCARD", bxCreditCard) Else bxCreditCard.custid = cCustID.CtlText bxCreditCard.cardAddress = cCardAddress.CtlText bxCreditCard.cardType = ccardtype.CtlText bxCreditCard.CVV = cCVV.CtlText bxCreditCard.ExpDate = cExpDate.CtlText bxCreditCard.name_card = cName.CtlText bxCreditCard.zipCode = cZipCode.CtlText SInsert1(CSR_Credit, "XCREDITCARD", bxCreditCard) End If Call TranEnd() End If End Sub
*This post is locked for comments