Get key field on copy |
11/19/2018 1:02:11 PM |
ASPRunner.NET General questions | |
T
Tim author
Hi all, |
|
A
|
Arkie 11/19/2018 |
Maybe I can get you started as I have a copy record working, but there a couple of gotchas which seem to be related to my lack of knowledge about version 10. |
admin 11/19/2018 | |
The idea of having WHERE clause as a parameter is to let you execute SQL query to retrieve the original record. XSession.Session["copyid"] = tDAL.DBLookup(String.Format("select <keycolumn> from <tablename> where {0}"), where);
|
T
|
Tim author 11/20/2018 |
@Arkie |
T
|
Tim author 11/20/2018 |
I am removing what I previously posted because I was wrong, it wasn't working. I still need to figure out why I get an error from the DBLookup. |
admin 11/20/2018 | |
A typo on my side. Here is the correct code: XSession.Session["copyid"] = tDAL.DBLookup(String.Format("select <keycolumn> from <tablename> where {0}", where)); |
T
|
Tim author 11/21/2018 |
Thank you (I probably should have been able to figure that out), but now I'm getting an error in the published app. It seems like the "where" parameter is empty. I tried displaying it on the page and I get nothing. And the here is the error I get when I click the copy link: |
admin 11/21/2018 | |
I can confirm that in current version of ASPRunner.NET where is empty in CopyOnLoad event. This is a bug and we are working on it. |