How to Connect DataBase using Robotframework

Recently, I finished a course about Robot framework and I’m try aplly in my job.

*** Settings ***
Library DatabaseLibrary
Library OperatingSystem

*** Variables ***
${DATABASE} CTC_MSILVA
${USERNAME} TESTE
${PASSWORD} QA#2023
${HOST} XXXXX
${PORT} 1433

*** Keywords ***
Conectar Banco de Dados SQL
Connect To Database pymssql ${DATABASE} ${USERNAME} ${PASSWORD} ${HOST} ${PORT}

Can someone help in this error? when I tryed to connect DB

*** When I use pymssql ***
Suite setup failed:
OperationalError: (20009, b’DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (host)\nNet-Lib error during Unknown error (10061)\nDB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (host)\nNet-Lib error during Unknown error (10061)\n’)

*** When I use pyodbc***
Suite setup failed:
OperationalError: (‘08001’, ‘[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server inexistente ou acesso negado. (17) (SQLDriverConnect); [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (53); [08001] [Microsoft][ODBC SQL Server Driver]Atributo de cadeia de conexão inválido (0)’)

@HelioGuilherme66 Can you help, please ?

Is it connecting with other client?

Check the connection parameters:

  • Try to use named arguments port=${PORT}
  • Try to use a different keyword, Connect With Custom Settings (I don’t recall the exact keyword name)