11/26/2024 8:26:09 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: Delete a row from a table in script
Posted: 23 Aug 06 5:32 PM
|
fiogf49gjkf0d I recently added my own popup menu and turned off the built in add edit delete features. My add and edit forms fire ok but my delete statements choke. I've tried: ------------------------------------------------------------------ strSQL = "Delete From C_PROJECT_TASKS " _
& "Where C_PROJECT_TASKID"
Set objRS = RemoveSelectionFromGrid(DataGrid1, "C_PROJECT_TASKSID", True, strSQL) ------------------------------------------------------------------ where c_Project_TasksID is the keyfield in DataGrid1 I get: Error in include file SLX_Common ( Variable is undefined SLX_DB at line 271) I do have SLX_Common included I tried writing my own connection and delete statement based on "C_PROJECT_TASKSID=datagrid1.selection" But, it failed also. I've tried messing with the syntax and am ready for a hint ... OK what the heck I'll even take the solution if you have it handy
|
|
|
|
Re: How To: Delete a row from a table in script
Posted: 23 Aug 06 5:40 PM
|
fiogf49gjkf0d Simple is best. Just delete the row from the database then refresh the grid:
sql = "delete from c_project_tasks where c_project_tasksid = '" & _ datagrid1.GetCurrentField("c_project_tasksid") & "'" Application.GetNewConnection.Execute sql datagrid1.Refresh
|
|
|
|
Re: How To: Delete a row from a table in script
Posted: 23 Aug 06 5:55 PM
|
fiogf49gjkf0d Perfect! I told you all I was Green. But hey, I'll help fill up your archive with some beginner Q and A's. I was close. I tried some SQL stements very close to yours only I failed to get the "datagrid1.GetCurrentField("c_project_tasksid") " part right. Thanks again. Sage should sponsor this site! RYAN for PRESIDENT |
|
|
|
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!
|
|
|
|
|
|
|
|