Hi Rick, the issue with the size of the dh file was resolved. However, on saving any information to the custom table, I am getting this error message:
System Message 10091
Cursor specified SqlReadOnly flag.
Function: sinsert(DefaultCreated)
Level: NOLEVEL
Tables(s): xSoaddressExt where CustID =
This is the code that is being used. Could you point me in the right direction to resolve this issue.
Private Sub Form1_Display()
Dim GridHandle As Integer
GridHandle = GetGridHandle("Spread1")
serr1 = VBA_Mextend(GridHandle, bxSoAddressExt, LenB(bxSoAddressExt))
End Sub
Private Sub Form1_Load()
Call VBA_SetAddr("bxSOAddressExt", bxSoAddressExt, nxSoAddressExt, LenB(bxSoAddressExt))
Call SqlCursorEx(csr_xSoAddressExt, NOLEVEL, "csr_xSoAddressExt", "xSOAddressExt", "xSOAddressExt")
End Sub
Private Sub Update1_OnUpdate(ByVal Level As Integer, ByVal InsertFlg As Integer, retval As Integer)
Dim SQLSTR$
If Level = 1 Then
If serr1 = 0 Then
row = MGetRowNum(GridHandle%)
End If
serr1 = MFirst(GridHandle%, MaintFlag%)
While serr1 = 0
bxAddress.CustID = GetObjectValue("cCustID")
bxAddress.ShipToID = GetObjectValue("cShipToId")
SQLSTR = "Select * from xSOAddressExt where Custid = " + SParm(bxAddress.CustID)
SQLSTR = SQLSTR + " and ShipToId = " + SParm(bxAddress.ShipToID)
serr2 = SqlFetch1(csr_xSoAddressExt, SQLSTR, bxSoAddressExt, LenB(bxSoAddressExt))
If serr2 = NOTFOUND Then
MaintFlag% = INSERTED
End If
Select Case MaintFlag%
Case UPDATED 'Existing line is updated
Call SUpdate1(c1, "xSOAddressExt", bxSoAddressExt, LenB(bxSoAddressExt))
Case INSERTED 'Existing line is new inserted one.
Call SInsert1(c1, "xSOAddressExt", bxSoAddressExt, LenB(bxSoAddressExt))
Case DELETED 'Existing line was deleted.
Call SDelete(c1, "xSOAddressExt")
End Select
serr1 = MNext(GridHandle%, MaintFlag%)
Wend
Call msetrownum(GridHandle%, row)
Call MDisplay(GridHandle%)
End If
End Sub