Why is it recommended to close the database connection every time after the work is completed?



Why is it recommended to close the database connection every time after the work is completed?..

Answer / Ramesh Chandra Chaudhary

Closing a database connection after use helps conserve resources, as the underlying database server can reuse those connections for other clients. Additionally, closing connections helps prevent issues like connection leaks and lock contention. In VBScript, you can close a connection using the Close method:nnSet conn = CreateObject('ADODB.Connection')nconn.Open 'DataSource', 'UserName', 'Password' n... nconn.Close

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?

1 Answers  


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

1 Answers  


HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?

1 Answers   TCS,


Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

1 Answers   Accenture,


What are the naming conventions while declaring a variable in the vbscript language?

1 Answers  


How to find a latest file from any folder

3 Answers   Ness Technologies,


this q asked in applabs, q is: QTP should open google.com page and enter "qtp" in one edit(search) box and click search and should open google.com again and enter "job" in edit(search) box and click on search. I tried this but getting error "Edit(search) box matches more than one object", could anyone this question plz..

1 Answers   AppLabs,


can anyone tell me the procedure of interview held in applabs

1 Answers  


How to write VB Script for selecting a particular row in a WebTable?

1 Answers   Patni,


Explain the tristate constants in vbscript?

1 Answers  


How to load vbs functions in qtp

2 Answers  


Explain about the functionality of vb script?

1 Answers  


Categories