Forum Discussion
MarioGV
1 year agoNew Contributor III
how can I close a database connection
cHi All, good day.
I'm using a database connection and it's working good:
Dim dt As DataTable = Nothing Dim dbConnApp As DbConnInfo = BRApi.Database.CreateDbConnInfo(_si, Dblocation.Externa...
- 1 year ago
hi All, after several tests and SQL readings, I found the solution, at the end it need to add a line:
dbConnApp.Close()
The database connection has closed and no error message.
I hope it could help somebody. Regards.
MarioGV
1 year agoNew Contributor III
Hi Daniel, it suppose to close the connection, but in the error log shows more than 100 pages with the same error message and it's difficult to track other messages. when I found the solution will let you know.
Thank you for your comment. Regards.
Mario Guerrero
- DanielWillis1 year agoValued Contributor
I think you might be doing something wrong. Using 'Using' is standard practise. Feel free to share your code.
- Henning1 year ago
OneStream Employee
I would also recommended to follow standard practice on that and try to use the "Using" statement as e.g. per snippet Daniel shared earlier.
Related Content
- 1 year ago
- 8 months ago
- 1 year ago
- 6 years ago