I am trying to connect to my local DB to use it with Langchain. This is how I am trying to create the connection but keep getting the below error when fromDataSourceParams runs;
const datasource = new DataSource({
type: 'mssql',
host: 'localhost',
username: '',
password: '',
database: 'RM',
logging: true,
extra: { trustServerCertificate: true },
});
const db = await SqlDatabase.fromDataSourceParams({ appDataSource: datasource });
err = new ConnectionError(err) ConnectionError: Login failed for user ''.
What am I doing wrong when am I creating the connection?
Tried to use my Windows credentials for username and password and be able to connect to the DB.