Avatar of visconti
visconti

asked on 

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

When I use this line code in my access project

 ACHI = "pippo@dompe.it"
 d = " test"
cc = "pippo@dompe.it"
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!!!!!!!!!!!
Email ServersMicrosoft AccessMicrosoft SQL Server

Avatar of undefined
Last Comment
visconti
ASKER CERTIFIED SOLUTION
Avatar of Göran Andersson
Göran Andersson
Flag of Sweden image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of visconti
visconti

ASKER

Tank you so much!!!!!!!!!
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo