Error once I am connected to my Azure SQL database


#1

Once I am connected, I do not get the DB overview and I get the error message:

ERROR {“status”:400,“content”:{“error”:{“message”:“Incorrect syntax near ‘-’.”}}} in the query page.

Please let me know how I could use it!


#2

I’m having the same issue.


#3

Hi support team, could you please help? I cannot use the tool now :frowning:


#4

That looks like the SQL request Falcon uses to build the DB overview failed.

This is the request that Falcon makes to a MS SQL server:

SELECT
    T.name AS Table_Name,
    C.name AS Column_Name,
    P.name AS Data_Type,
    P.max_length AS Size,
    CAST(P.precision AS VARCHAR) + '/' + CAST(P.scale AS VARCHAR) AS Precision_Scale
    
FROM sys.objects AS T
JOIN sys.columns AS C ON T.object_id = C.object_id
JOIN sys.types AS P ON C.system_type_id = P.system_type_id

WHERE T.type_desc = 'USER_TABLE';

Could you try to run this request in the editor and confirm it fails in your case?

If the request above fails, please, could you check if the simplified version below works?

SELECT
    T.name AS Table_Name,
    C.name AS Column_Name,
    P.name AS Data_Type
    
FROM sys.objects AS T
JOIN sys.columns AS C ON T.object_id = C.object_id
JOIN sys.types AS P ON C.system_type_id = P.system_type_id

WHERE T.type_desc = 'USER_TABLE';

#5

@olivierblais1 Could you also post the request that triggers the error “Incorrect syntax near ‘-’.”?

I’ve opened an issue on github to track a similar issue with the MSSql connector. See here: https://github.com/plotly/falcon-sql-client/issues/299


#6

Hello!

The requests works.
Also, I get this error message once I am connected. I do not need to make any requests. However, this is the request which shows up once I am connected

SELECT TOP 10 *
FROM bandwidth_usage;

Thanks
Olivier


#7

@olivierblais1 We’ve just got a pre-release of Falcon here that upgrades the library to connect to a MSSQL server. Would you be able to test if this problem is still present, please?


#8

Hi @n-riesco

After testing the beta1, I am now able to see my tables and columns, but after a couple of seconds after reaching out the Query screen, the same error message pups up and makes it impossible to query my db.


#9

@olivierblais1 Does the error happen before or after running the query?

If it happens after running the query, could please run a simple query? For example, a query to get the list of tables: SELECT TABLE_NAME FROM information_schema.tables.

Another place that may contain more info is the log file (but it’s quite terse to read). See my comment here.


#10

Hi, no it happens before I can execute any queries. Thanks for looking into it.


#11

I’m looking into this issue again and I have a question. I understand from your comment above that the database preview works, but after a few seconds the query editor stops working. Is that correct?

What do you see in the chart? Does it show any data before the error pops up?