Ryu
7 years agoContributor
Connection to DB not closing properly?
I have this function that accesses a database using ADODriver. I have it closing the connection at the end, and the first run through the function when I open TC passes. However, on a subsequent run, TestComplete will crash because the connection is still open. I'm not sure what I am missing. Can anyone help? I did notice, as I got to "countTable.ADOConnectionObject." that the auto-extension table didn't display for me to choose the Close() property, so I did type that manually.
def getTableValues():
num = []
countTable = DDT.ADODriver(ConStr, query) while not countTable.EOF(): num.append(countTable.Value[1]) countTable.Next() for i in num: Log.Message(i) countTable.ADOConnectionObject.Close()