data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

Incorrect syntax near 'INCLUDE_NULL_VALUES

Open sreevelicheti opened this issue 1 year ago • 2 comments

I get the below error when I execute a REST API method from swagger.

{ "error": { "code": "DatabaseOperationFailed", "message": "Incorrect syntax near 'INCLUDE_NULL_VALUES'.", "status": 500 } }

sreevelicheti avatar Sep 12 '24 16:09 sreevelicheti

Can you help us create a repro by supplying samples of:

  1. database schema
  2. Dab-config.json
  3. what you are filling in within the Swagger UI?
  4. Console output of DAB which shows the generated SQL query and relevant errors?

seantleonard avatar Sep 12 '24 16:09 seantleonard

Hi, I am also facing same issue in get API and post API is working fine. 371611151-a34af382-d3e2-4027-9c00-f81dd401fdb8

Please help anyone.

Thanks

rawatrinku1412 avatar Sep 27 '24 17:09 rawatrinku1412

This error does not appear when using the latest version of SQL Server. I have also tested this in mssqllocaldb.Image

waqarkabir avatar Nov 12 '24 16:11 waqarkabir

Use store procedure instead of table "entities": { "GetUser": { "source": { "object": "dbo.GetUser", "type": "stored-procedure", "key-fields": ["id"]

OlaideNi avatar Jun 14 '25 19:06 OlaideNi

This error does not appear when using the latest version of SQL Server. I have also tested this in mssqllocaldb.

waqarkabir avatar Jul 02 '25 03:07 waqarkabir