Forum Discussion

GaleG's avatar
GaleG
New Contributor
8 years ago

Database Connection

Is there a way to set a database connection and the query that database from multiple scripts?  I keep adding

Set connection = ADO.CreateConnection
connection.ConnectionString = "Provider=***;Password=***;Persist Security Info=True;User ...
connection.Open

 

to every script and I'd like to just set it once.

  • You can set connection stuff in one script and call that when ever you need from other scripts,

     

    you can refer this  to how to call routines.

    If you like to have more advance set up, consult your developers how to use OOP concepts.

  • NisHera's avatar
    NisHera
    Valued Contributor

    You can set connection stuff in one script and call that when ever you need from other scripts,

     

    you can refer this  to how to call routines.

    If you like to have more advance set up, consult your developers how to use OOP concepts.