Refreshing Project Connection Using VBA

A

Alibaba

hi,
i am using an adp access connected to 2005 sql server. I open a stored
procedure using DoCmd.OpenStoredProcedure stdocname. The stored procedure
name does not change. however the contents of the stored procedure change.
sometimes is is like
"ALTER proc Report_SP_64 as Select * from EXECUTIVE_BS_REPORT"
others like
ALTER proc Report_SP_64 as Select * from accounts.
and so on ..

when executed on sql server the stored proc gives the right results.

When it's calle from ADP it comes up right the first time then it is blank.
it does not produce the right results until the connection is refreshed.

My Question is :
how do i referesh the stored proc using vba.
or
how do i refresh the connection to the db via vba.

thanks
Alibaba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top