SQL. Debugging stored procedures and identifying the causes of errors
Use the stored procedure exec print (str) to output the variables of interest - it writes to the as_trace table with the print code. In the admin area, you can view the latest output results of this procedure.
You can run the procedure directly from the SQL editing window.
Fill in the parameters (you can just copy them from the procedure) in the format " @name=value,"
For complex types, the format is: @[parameterName]___[SQLType]=[key]||[value]___[key]||[value]
- Where SQLType is CRUDFilterParameter, DictionaryParameter, ExtendedDictionaryParameter.
- Separators are triple underscores (between the parameter name and the type).
- Complex type parameters are also separated by a triple underscore (___) and inside 2 vertical lines (||).
During the test call, the transaction is Rollback. in Other words, all changes in the database will be canceled, but you will get all the data that the procedure outputs.
How do I get parameter values that are passed to stored procedures?
To do this, specify the debug=[storage name] parameter in the URL.
As a result, the parameter values will end up in the trace print table (the name and all parameters with values are output).
Example address: https://falcon.web-automation.ru/pages?debug=crud_pages_getitems
Note: this mode works only if the core values are passed through DynamicParameters (in most cases, It is used).
Also use SQL Profiler Expressto view which parameters are passed to stored procedures. To do this, you must grant the user rights to trace (run on the server):
use master GRANT ALTER TRACE TO falcon2;
to cancel the trace right, use on the server:
use master Revoke ALTER TRACE TO fxproject2;
More detailed documentation for SQL Profiler Express - https://drive.google.com/file/d/0B8N7eBTTS7MbYmplT1NZbGk0T0U/view?usp=sharing
If an error occurs or it is unclear why the query is not working correctly, see the query in SQL Profiler Express, copy it to SQL Management Studio (directly with the same parameters), and debug a clean call in SQL Management Studio.
Examples of how Falcon Space platform components workExamples of convenient tables and forms Examples of dashboards Examples of graphs and charts Example of a calendar Table with API data Example of displaying a map with points Types of form fields Example of a statistics widget Example of a hierarchy tree Example of the Time line component Example of a product card Example of resource load tracking Example of a Kanban board Example of a master form Example of uploading Excel/Word documents Example of filling in TIN data
- Falcon Space Foundation
- Basic components
- Falcon Space Features
- Additional component
- HOWTO Tables
- HOWTO Forms
- HOWTO JS
- HOWTO CSS
- HOWTO Layout
- Solve problems
Falcon Space Platform
This is a reduction in the cost of ownership
at the expense of fewer people to support
This is a quick change
while using the program
This is a modern interface
full adaptation for mobile devices