Announcements
I am trying to add detail grid for a custom table xBillable, but get this error on form load. Anyone can help me? Thanks.
System.InvalidCastException was unhandled Message="Unable to cast object of type 'System.String' to type 'System.IntPtr'." Source="Solomon.Kernel" StackTrace: at Solomon.Kernel.Exports.DetailSetup(Int16 , Object , Object , SolomonDataObject , Object , Object , Object ) at ST26000.VBTools.DetailSetup(Int16 Cursor, SAFGrid SAFGridCtrl, Object AutoLineNbfFld, SolomonDataObject& bTable1, Object& bTable2, Object& bTable3, Object& bTable4) in ) at ST26000.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 InnerException:
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Call ApplInit()
Call SetAddr(LEVEL0, "bCustomer", bCustomer, nCustomer)
Call SetAddr(LEVEL1, "bXBillable", bXBillable, nXBillable)
Call SqlCursorEx(csr_Customer, LEVEL0, "csr_Customer", "Customer", "Customer")
Call SqlCursorEx(csr_XBillable, LEVEL1, "csr_XBillable", "XBillable", "XBillable")
Call ScreenInit()
mh_xBillable = DetailSetup(csr_XBillable, SafGrid1, bXBillable.LineNbr, bXBillable, PNULL, PNULL, PNULL)
End Sub
*This post is locked for comments
The error id gone after I used
bXBillable.AddressOf("LineNbr")
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156