1. John Willems
  2. Valentina Studio
  3. Friday, April 05 2024, 06:32 PM
  4.  Subscribe via email
In working with the Document Generator in current the version, it appears to not work (limited) with MS SQL server. It only generates limited info for the first table in the database. Effectively one page.

When in MySQL it appears to generate all the information you expect, many pages of information.

There are not any error messages that I have seen.

Suggestions?

Regards

John Willems
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello John,

What SQL Server version is used?
Is it own or hosted server?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 1
John Willems Accepted Answer
Its a hosted server and SQL Server v2016. Same setup as the issue with the schema not showing.

John W
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 2
John Willems Accepted Answer
It appears that Valentina generally does not like MS SQL Server. It shows errors for common SQL functions.

Again hosted SQL Server 2016, current version of Valentina.

Suggestions?

John Willems
Attachments (2)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 3
Sergey Pashkov Accepted Answer
The information about these functions is missing from the system tables, so they are not loaded automatically.
We will add them manually in the next version.

To avoid distractions, unresolved identifier checks can be disabled using "A" button.
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 4
John Willems Accepted Answer
Thank you I can work with disabling the checks.

Can you tell me how to get the Documentation Generator to run against a MS SQL database? It was the item that opened this thread.

Regards,

John W
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 5
Sergey Pashkov Accepted Answer
One of the queries fails, need to find it.
What information is printed last for the first table?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 6
John Willems Accepted Answer
After I clear the Query Log and then run the documentation generator there are not any queries recorded.

I have attached the saved .pdf documenation that is recorded. Address is the first table in the database. You will see there are only the columns for the table and then it stops the process.

Suggestions are appreciated.

John W
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 7
Sergey Pashkov Accepted Answer
The documentation is built on top of Valentina Reports engine. It uses a separate connection, so there are no entries in the Query Log.

As a first step, we can check if some tables are not accessible to the user.

For the table report, the following tables are queried:

SELECT * FROM sys.check_constraints;
SELECT * FROM sys.indexes;
SELECT * FROM sys.index_columns;
SELECT * FROM sys.triggers;
SELECT * FROM sys.foreign_keys;
SELECT * FROM sys.foreign_key_columns;

Are all of the queries executed, or are there some errors?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 8
John Willems Accepted Answer
From what I can tell those queries run without error and return records. Here is an image of the Query Log. (See image) I ran them as a group and then individually.
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 9
Sergey Pashkov Accepted Answer
Thank you, so queries to the system tables should work.
We'll create a test build with improved error processing, making it easier to diagnose the problem.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 10
Sergey Pashkov Accepted Answer
Hello John,

I've added a video on how to diagnose an error in the generation of documentation in the latest version, 13.10.

1. Open the `schema_report` project on the start page.
2. Edit the datasource to point to any database on the target SQL Server.
3. Preview a report. If there is an error, it will be displayed at the bottom.

The built-in functions are not yet recognized.
Attachments (1)
References
  1. https://www.dropbox.com/scl/fi/p8h81ue50kpk61uknwde9/vs_schema_report_mssql.mov?rlkey=x5n7xigfistyn17vqjed6c4n6&dl=0
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 11
John Willems Accepted Answer
I was not able to change the datasource for the report using the method shown. I went to the report and changed the data source for it. I hope that would give the same result. I then ran the report and saw the following errors reported. See image.
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 12
Sergey Pashkov Accepted Answer
Thank you. It appears to be a different error; the subquery is empty for some reason.

I've attached a project in which the configuration dialog contains a button to view log messages.

This dialog is shown upon opening the project and can also be started manually (Form_Config).
Attachments (1)
References
  1. https://www.dropbox.com/scl/fi/9z7qop71vslzw6npppd5n/schema_report_ms_logs.mov?rlkey=0cfeew32gz6bqv2s3px1636sk&dl=0
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 13
John Willems Accepted Answer
This is the summary from running the report.

====== Report_MSSQL ======
!Page 1: SELECT
sys_idx.*,
( SELECT STRING_AGG( COL_NAME( sys_idx_cols.object_id,sys_idx_cols.column_id ),', ' ) FROM sys.index_columns sys_idx_cols WHERE is_included_column = 0 AND sys_idx_cols.index_id = sys_idx.index_id AND sys_idx_cols.object_id = sys_idx.object_id ) columns,
( SELECT STRING_AGG( COL_NAME( sys_idx_cols.object_id,sys_idx_cols.column_id ),', ' ) FROM sys.index_columns sys_idx_cols WHERE is_included_column = 1 AND sys_idx_cols.index_id = sys_idx.index_id AND sys_idx_cols.object_id = sys_idx.object_id ) included_columns
FROM
sys.indexes sys_idx
WHERE object_id = $1
AND index_id > 0
!Page 1: Binds: ( 1655012977 )
!Page 1: [FreeTDS][MSSQL Server] , Server SQL5090, Line 4
'STRING_AGG' is not a recognized built-in function name.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 14
Sergey Pashkov Accepted Answer
Hello John,

Thank you. It is now clear that one function is not available in the SQL Server being used by the hosting service, and we will need to rebuild the query without it.
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories