Hi,
I want to know if I can get the real sql that sent by ebase app to the database. What I mean is something like this:
suppose the in the database resource I have sql like this:
INSERT INTO myTable (field1, field2) VALUES (&&field1, &&field2)
In the script I put the value 'abc' to the field1 and 'def' to the field2.
Can I get: INSERT INTO myTable(field1, field2) VALUES ('abc', 'def') before ebase send it to the database?
Thanks in advance for the help.
can I get the real sql ebase apps execute before send to db?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Click debug on the Database Resource and the SQL is logged. If the database has the Use Prepared Statements option checked (which is recommended) it isn't quite so simple as a single visible statement as it just doesn't work that way, but you should be able to see all the information. If you uncheck Use Prepared Statements you will see a single insert statement logged.
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
First, thanks for the respond.
Where can I see the log? From execution log?
If so, all see is something like this:
23:41:37.023 Debug: Start execution of command - updatetable: 23:41:37.023
23:41:37.023 Debug: End execution of command - updatetable : 23:41:37.023
Where can I see the log? From execution log?
If so, all see is something like this:
23:41:37.023 Debug: Start execution of command - updatetable: 23:41:37.023
23:41:37.023 Debug: End execution of command - updatetable : 23:41:37.023
Jon wrote:Click debug on the Database Resource and the SQL is logged. If the database has the Use Prepared Statements option checked (which is recommended) it isn't quite so simple as a single visible statement as it just doesn't work that way, but you should be able to see all the information. If you uncheck Use Prepared Statements you will see a single insert statement logged.
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
IC.
What can make there is no changes to the table while I do issue the updatetable command?
here is what I do:
1. issue the fetchtable to position the first record as the current row
2. assign the field with new value
3. issue the updatetable
am I doing something wrong, so the table is not updated?
What can make there is no changes to the table while I do issue the updatetable command?
here is what I do:
1. issue the fetchtable to position the first record as the current row
2. assign the field with new value
3. issue the updatetable
am I doing something wrong, so the table is not updated?
Jon wrote:Yes, the execution log. If you don't see any SQL statements logged, there were no changes to the table.
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Hi,
Just manage to solve the problem, actually the problem is not in the insert but in the update command.
I still not fully grasp the concept in ebase, but I think now I move a bit in it.
But still, the info how to get the real sql command send from ebase app to the database is a great information for debuging.
Thanks for the help, Jon.
Just manage to solve the problem, actually the problem is not in the insert but in the update command.
I still not fully grasp the concept in ebase, but I think now I move a bit in it.
But still, the info how to get the real sql command send from ebase app to the database is a great information for debuging.
Thanks for the help, Jon.
0 x
Who is online
Users browsing this forum: No registered users and 17 guests