Skip to content

Tag: sql-server

Get function reference from mssql TYPES object using string

Node.js / mssql / typescript I’m trying to build a set of input parameters dynamically and add them to a prepared statement. With the code below, the error I get is: Element implicitly has an ‘any’ type because expression of type ‘string’ can’t be used to index type ‘{ VarChar: ISqlTypeFactoryWithLength; NVarChar: ISqlTypeFactoryWithLength; Text: ISqlTypeFactoryWithNoParams; … 29 more …; Variant:

Javascript date to sql date object

I’m trying to write a query that takes a Javascript date object and then puts it in an object type that is recognized by both SQL Server and Oracle database types. The issue is that I’m using webservices. So it has to be a string, not an actual passed parameter. Here’s what I mean: Except firstDayOfMonth and lastDayOfMonth are surrounded