11/26/2024 10:26:15 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
How to: stop-Non-nullable column cannot be updated to Null - Error Message
Posted: 23 Aug 06 5:45 PM
|
fiogf49gjkf0d I have a tree view which populates a datagrid next to it. When the tree view is on the first level "+All Tasks" if I write click on a task in the datagrid , instead of getting a menu I get error message: "Non-nullable column cannot be updated to Null". If I expand my tree view one or two levels and right-click in the datagrid I get the popup menu I expect. Any Ideas? Heres the code: But, don't look at it cuz it'll give you a migraine and take away all of your time and energy ------------------------------------------------- Sub AXFormOpen(Sender) on error resume next CAll PopulateTree DataGrid1.Refresh End Sub
Sub PopulateTree on error resume next Dim strSQL Dim objConn Dim objRS Dim objNode0 Dim objNode1 Dim objNode2 'Dim objNode3 Dim strProject Dim strParent strSQL="SELECT " &_ "A3.C_PROJECT_PARENTSID, " &_ "A3.PROJECT_PARENT_NAME as PARENT_NAME, " &_ "A2.PROJECT_NAME as PROJECT_NAME, " &_ "A1.PROJECT_TASK_NAME as TASK_NAME " &_ "FROM " &_ "C_PROJECT_PARENTS A3 " &_ "left OUTER JOIN " &_ "C_PROJECTS A2 ON (A3.C_PROJECT_PARENTSID=A2.C_PROJECT_PARENTSID) " &_ "left OUTER JOIN " &_ "C_PROJECT_TASKS A1 ON (A2.C_PROJECTSID=A1.C_PROJECTSID) ORDER BY PARENT_NAME, PROJECT_NAME " if bk_debug >1 then msgbox strSQL end if set objConn=New Dataconnection objConn.Initialize Set objRS=objConn.ReturnRecordset(strSQL) TreeView1.Nodes.Clear Set objNode0=TreeView1.Nodes.Add(Nothing, "All Tasks") While NOT objRS.EoF If strParent<>objRS.Fields(0).Value or IsEmpty(strParent) Then Set objNode1=TreeView1.Nodes.AddChild(objNode0, objRS.Fields(1).Value) objNode1.Tag=objRS.Fields(0).Value strParent=objNode1.Tag strProject="" objNode1.Expand FALSE End If IF strProject<>objRS.Fields(2).Value or isEmpty(strProject) Then Set objNode2=TreeView1.Nodes.AddChild(objNode1, objRS.Fields(2).Value) strProject=objNode2.Text End IF 'Set objNode3=TreeView1.Nodes.AddChild(objNode2, objRS.Fields(3).Value) objRS.MoveNext WEND objNode1.selected=True objNode0.Selected=True 'Set objNode3=Nothing Set objNode2=Nothing Set objNode1=Nothing Set objNode0=Nothing objRS.Close Set objRS=Nothing objConn.Terminate Set objConn=Nothing End Sub |
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|