<< SharePoint 2019 'Modern' Web PartsTable of contents 
SQL Query Viewer Web Part

The SQL Query Viewer Web Part allows to query external SQL Server databases and displays the result as a pageable list without having to resort to Sharepoint Designer.
The Enterprise version adds OLE-DB and ODBC data source support (MS Access, Excel, CSV, Oracle etc.), allows to create Web Part connections (row filters etc.), sort columns and define search filters.
Sharepoint 2019 Modern SQL Query Viewer Web Part

Web Part Configuration:


Title:
enter the optional web part title

Web Part:
AESQL

Configuration:
enter the below configuration options:

connection=enter the database connection string
pwd=enter the connection password
parameters=Northwind (alternatively enter the name of your connection parameter file)
query=SELECT.. (enter your SQL SELECT query)
pagesize=7 (enter the desired page size)
filter=LastName (enter the desired optional search filters)
formatting (column formatting, see "Column Formatting here)
totalcolumns=column1;column2;..(enable column totals)
grid=1 (enter the desired grid layout)
header=some text (enter the optional header text)
footer=some text (enter the optional footer text)
rows=0 (suppress the number of rows displayed at the bottom)
columnheaders=0 (suppress the column headers)
columnwidths=Lastname=200 (set speific column widths)
columnnames=Lastname= Last Name (define column aliases)
options=enter additional options as needed

Web Part Configuration



Please enter a comment below if you want to give feedback or have suggestions for improvements:

User Comments Post a Comment 

Eric Gonzalez  
7/27/2021 17:05 
How can I add Totals for columns?
Juerg  
7/27/2021 17:08 
Eric,
you will first need to re-download and then update the web part (the current version is 2.1.75).
You then can add the below lines to the web par’s “Configuration” setting:

totalcolumns=CheckedIn;Confirmend;other columns as needed..
formatting=SchDate:{date=d}


Please note that we are not able to reach you via eric@mercyrehabservices.com (eg. we get non-delivery messages).
Eric Gonzalez  
7/27/2021 17:57 
I originally orderd the AEWB-S bundle. Is there a link i can use to update the bundle? Or do I have to just download and install the individual webparts
Juerg  
7/27/2021 18:08 
Eric,
please just download the SQL Query VIewer web part for SP 2019 (see /apps/page.asp?Q=5753 )
Eric Gonzalez  
8/18/2021 17:27 
Is there a way to hide the password on the connection String?
I had to used the UserID and the password in the connections String. I was not able to use the pwd= option for my Advantage SQL database? Thanks
Excellent Product!!!
Juerg  
8/18/2021 17:42 
Eric,
you can use the {pwd} placeholder which can be embedded in the web part’s “DB Connection String” setting.
The placeholder will be automatically replaced by the value entered into the “Connection Password” field (which is masked by the web part)

Example:
Driver={Microsoft ODBC for Oracle};Server=myServer;Uid=myUser;Pwd={pwd};