troubleshooting Question

Loosing connection after xp_sendmail or sp_send_dbmail inside my access project 2003 0r 2007

Avatar of visconti
visconti asked on
Email ServersMicrosoft AccessMicrosoft SQL Server
2 Comments1 Solution218 ViewsLast Modified:
When I use this line code in my access project

 ACHI = ""
 d = " test"
cc = ""
ogg = "Rendiconto reimmesso per revisione. "
 sql = "use master EXEC master.dbo.xp_sendmail @recipients='" & ACHI & "',@message='" & d & "',@copy_recipients='" & cc & "',@subject='" & ogg & "',@no_output=true"

DoCmd.RunSQL sql

The code send the mail but I Loose the connection between my access project and the database in SQL server so if (in my Access project) I use the code....dcount("id","dati") or dlookup() or if I try to open a table in my access project I receive the error of Sql not connect and table not present  
Help ME!!!!!!!!!!!
Göran Andersson
Web developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros