Skip to content

[Bug] CREATE (DDL) function error on MS SQL Server using DBCode 1.30.8 #1084

@pfinnpyro

Description

@pfinnpyro

Bug Description

When attempting to create a TSQL ddl script for a table using dbcode, errors appear.

Repro steps

  1. Go to Connections
  2. Select a Microsoft SQL Server connection
  3. Right click on a table and select Script -> CREATE (DDL)
  4. See error

Expected Behavior

The extension should generate an SQL DDL script for the table

Actual Behavior

  1. A toast notification displaying the following error appears:
    Error getting ---, error: MS SQL does not have table in getObject

  2. A toast notification displaying the following error appears:
    The following errors occurred: ---: Could not retrieve DDL for ---

Environment

  • DBCode version: 1.30.8
  • VS Code (or fork) version: 1.118.0-insider
  • OS: Windows 11
  • Database: Microsoft SQL Server 2022
  • Connection: Direct

Error Meesages (if applicable)

  1. Error getting [table_name], error: MS SQL does not have table in getObject
  2. The following errors occurred: [table_name]: Could not retrieve DDL for [table_name]

Screenshots

Image

Logs

2026-04-30 16:49:04.671 [info] DBCode starting...
2026-04-30 16:49:04.671 [info] DBCode started
2026-04-30 16:49:04.671 [info] Auth: Sign in restored as '---' with 'GitHub'
2026-04-30 16:49:04.856 [info] LS: Initialized with storage path: c:\Users---\AppData\Roaming\Code - Insiders\User\globalStorage\dbcode.dbcode
2026-04-30 16:49:04.860 [info] History: Manager initialized successfully
2026-04-30 16:49:04.946 [info] LS: Started
2026-04-30 16:49:07.535 [info] AI provider: Copilot
2026-04-30 16:49:09.551 [info] API 'POST:jwt' OK
2026-04-30 16:49:10.306 [info] Connection: opened '---' on '---' (mssql:Standard Edition (64-bit) - 16.0.1175.1)
2026-04-30 16:49:10.443 [error] MS SQL does not have table in getObject
2026-04-30 16:49:10.443 [error] Error getting ---: MS SQL does not have table in getObject

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions