Problem connecting to database

Good day all. I am having same issue described here after deploying shiny app to server, I keep getting same error 'Data source name not found, and no default driver specified'
find below sql odbc connection. sql_script is my input variable. I first created a data source name using an 'odbc data source connection 64 bit' on my computer system before running the code on R console.
However, it worked when I first deployed it but stopped working after a while.
Please how do I go about this?

#SQL_DB_CONNECTION
con=odbcConnect("dsn",uid="xxxxx", pwd="xxxxxxxxxx")
on.exit(odbcClose(con))
sql_db=sqlQuery(con,sql_script)

The error message is telling you that the DSN doesn't exist on the server (only in your local system) so there is no information about the sql server's address or what driver to use, try setting those parameters explicitly instead of using a DSN

please, how can I set the parameters asides using a DSN?

https://db.rstudio.com/getting-started/connect-to-database

And since you are deploying to shinyapps.io, check out the documentation for deploying an app with a database connection,

https://docs.rstudio.com/shinyapps.io/applications.html#accessing-databases-with-odbc