Having some trouble, been working on this off and on for 3 days thinking I would "get it" eventually.
I have read, researched,etc and I am finally asking for some help because I know I am close but ready to drown the keyboard in the bathtub.
I have a button that does an AJAX callback to do several things, geocode, save, run a function to INSERT into jqcalendar (one of my tables)
then I thought man it sure would be fun to do another INSERT into a different table grabbing the pk of the last INSERT
So I added in an AJAX callback to run another xbasic function - mostly because I kept getting a zero for the pk.
I have a guuid that gets submitted into jqcalendar so I thought I will just grab the pk from the row that matches the guuid rather than look for the lastinserted identity which seemed troublesome to me anyways.
so here my code to SELECT the Id WHERE the guuid matches the guuid in the table
Can someone tell me why they think this is a no go?
Looks good to me, lol
I could not use the debugger because I am getting img errors for the buttons that I have but i can verify that the field names are all accurate so there must be some sorta syntax/code snot.
I have read, researched,etc and I am finally asking for some help because I know I am close but ready to drown the keyboard in the bathtub.
I have a button that does an AJAX callback to do several things, geocode, save, run a function to INSERT into jqcalendar (one of my tables)
then I thought man it sure would be fun to do another INSERT into a different table grabbing the pk of the last INSERT
So I added in an AJAX callback to run another xbasic function - mostly because I kept getting a zero for the pk.
I have a guuid that gets submitted into jqcalendar so I thought I will just grab the pk from the row that matches the guuid rather than look for the lastinserted identity which seemed troublesome to me anyways.
so here my code to SELECT the Id WHERE the guuid matches the guuid in the table
Can someone tell me why they think this is a no go?
Code:
function create_task as c (e as p)'debug(1) dim cn as sql::Connection dim args as sql::arguments dim mynewpk as C args.Add("subject",e._currentRowDataNew.Full_Name) args.Add("jobguid",e._currentRowDataNew.taskguid) args.Add("mynewpk",mypk) sqlget = "SELECT Id FROM alphanwcopro.jqcalendar WHERE taskguid = :jobguid" sql3 = "INSERT INTO alphanwcopro.company_jobs_tasks set tasks_jobs_id = :mynewpk, Subject = :subject" cn.open("::Name::Connection1") cn.Execute(sqlget,args) dim rs as sql::ResultSet rs = cn.ResultSet mypk = rs.data("Id") cn.Execute(sql3,args) cn.close() end if end function
Looks good to me, lol
I could not use the debugger because I am getting img errors for the buttons that I have but i can verify that the field names are all accurate so there must be some sorta syntax/code snot.
Comment