07-22-2010, 05:17 PM
whenever you create an object, it is always a good practice to free up the allocation used by the object. it depends on the scope of the object you are using in. e.g. the connection object you mentioned would be limited to your work in the part of your script which is related to do with databases otherwise no, so close/free up the object as soon as you finish the things. see the examples given the post.
you can do this by setting the object as Nothing somthing like
on the second point:
one of the way could be to store the username and password encrypted in the registry.
for more details. this is from coding point of view, but may be you can get an idea from this.
you can also visit http://www.connectionstrings.com/mysql
you can do this by setting the object as Nothing somthing like
Code:
Set oConnection = Nothing
on the second point:
one of the way could be to store the username and password encrypted in the registry.
for more details. this is from coding point of view, but may be you can get an idea from this.
you can also visit http://www.connectionstrings.com/mysql