Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the user-defined data types? #1610

Open
jhunexjun opened this issue Feb 20, 2024 · 0 comments
Open

How to use the user-defined data types? #1610

jhunexjun opened this issue Feb 20, 2024 · 0 comments

Comments

@jhunexjun
Copy link

Can this package supports user-defined data types?

Expected behaviour:

just normal as built-in types like NVARCHAR, VARCHAR, etc.

Actual behaviour:

TypeError: Cannot read properties of undefined (reading 'type')

Configuration:

return await msSqlConnect.getInstance().then(pool => {
        return pool.request()
          .input('userId', msSql.T_USR_ID, req.query.userId)
          .query('select * from SY_USR where USR_ID = @userId')
      }).then(result => {
        console.log('result: ', result);
        return result.recordset;
      }).catch(err => {
        console.log(err);
      });

The T_USR_ID is a user-defined data type.

Software versions

  • NodeJS: v16.13.0
  • node-mssql: "mssql": "^9.1.1",
  • SQL Server: Microsoft SQL Server 2019 (RTM-GDR) (KB5029377) - 15.0.2104.1 (X64)
    Aug 16 2023 00:09:21
    Copyright (C) 2019 Microsoft Corporation
    Developer Edition (64-bit) on Windows 10 Pro 10.0 (Build 22621: ) (Hypervisor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant