Error connecting to SQL Server with ADO

Asked

Viewed 28 times

0

I am trying to make a connection to a database in Sql Server, so it is giving this error


Javascript Runtime error.

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified


I’m a few days cracking my head to make this connection where I want to connect and make a simple select so that I’m not getting is that someone can give me a light from where I’m going wrong?

function TestConexao(){
  var aCon = ADO.CreateADOConnection();
  aCon.ConnectionString = "DSN=GROUP- 
  NOTEXX\SQL2014;Database=meuBanco;UID=usuario;PWD=senha;";
  aCon.LoginPrompt = false;
  aCon.Open();
  aCon.Execute_("Select * From ConfiguracoesIniciais")
  aCon.Close();
}
  • JavaScript? how you’re doing this code?

  • Javascript yes to using a test tool where I am trying to connect in a database to test automated way the creation of some fields. https://support.smartbear.com/testcomplete/docs/testing-with/working-with-external-data-sources/databases/using-ado-and-bde-objects/connecting-to-ms-sql-server-using-ado.html

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.