An error has occurred connecting to the database! [was:Bug Report #1755960048851]

OS info

  • Operating System : Windows 10.0.19045
  • Wappler Version : 7.2.0

Problem description

Adding a custom database connection via the Database Manager screen.
Microsoft SQL Server
Test is OK
Getting this error message:

An error has occurred connecting to the database!

Cannot read properties of null (reading 'toLowerCase')

Steps to reproduce

  1. Database Manager
  2. Database Connections
  3. Add
    Type = custom
    Database = Microsoft SQL Server
    Entered Host Port (1433) user, password, database, encrypt enabled.
  4. Test OK
  5. Save

what server model do you use = NodeJS

how is your database created = External Azure database. IP whitelisted

How is your database connection defined in the database manager = Custom Database

How is the database connection define in server connect globals = not sure how to respond. Under Globals > Database Connections > "Vantaca". Database Connection screen looks the same as in the Database Manager screen. Custom Database > SQL Server.

What is your active target = development

Do you use docker = yes version 4.44.3 (202357)

report1755960048715.zip (142.9 KB)

Are you sure that this is a bug?

Have you checked the database queries for properly working conditions (where clause) as in:

Edit: One way to prove if the API action works is to open the action in a browser:

Hi Ben,

The error I get is on the connection.

image

When I try to build a query, the tables come up "no items".

My apologies, I assumed that the database connection was OK and that the error message Cannot read properties of null (reading 'toLowerCase') was caused by the database query.

Please ignore my posts.

Can you check the json file if it's corrupted or something?

Try using vscode to open database file, something like:
.wappler\targets\Development\databases\Vantaca.json

Maybe some line is breaking things there, so check for a null value or something strange..

PS: I don't think it's a syntax problem but in any case you should see:
image

Hi Ben,
I figured out how to do a custom query (never did it before) and was able to pull information from the SQL database.

I'd like to be able to use the other query features in Wappler.

Does this get me any closer to a resolution?

no problems detected.

Is it something to do with the schema? Is there a way to force it to dbo?

This is what it looks like in DBeaver (not sure if that helps)

Not sure and sorry :frowning_face: I don't want to create more mess than you already have..

Could you try to fully refresh your database schema first in the database manager? By click on the " tables" node, then right click and from the context menu choose " refresh Full Schema"