database - VBA Excel 2003 disconnecting to DB object -


i have watched code execute. executes 'close' 'setting nothing'. returns the 'close' , throws error 91 "object variable block not set".

public sub closeitdown()    ' clean , shut down    cnxrptrs.close    set cnxrptrs = nothing end sub 

i have used code in many 'applications'. time using , start routine several times connecting , disconnecting db. clear temp tables , start different set of circumstance. around problem , want finish.

set cnxrptrs = new adodb.connection cnxrptrs.open strforcnx 'open connection. ... 

the first time through there no problem on second time when problem happens.

if call close related object (conn, command, , rs objects set nothing). specific rules in help.

don't this

set cnxrptrs = nothing 

and don't that

set cnxrptrs = new adodb.connection 

what trying do, make boy of you, know it's at.

just close , (re) rs.open. command object check conn propery set.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -