0

So I am using pypyodbc to connect to a SQL Server Database. For my code to work properly I believe the easiest and most efficient practice would be to open the connection and retrieve the data as a global variable. However, I vaguely remember reading somewhere that this is a bad practice and should be avoided. So my question is this, is this a bad practice and why? If so how bad? It could be avoided but it would be preferred to be a global variable. Thanks!

0 Answers0