Automation Error Sql Server 2005
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies
Sql Server Automation Ideas
of this site About Us Learn more about Stack Overflow the company sql server automation scripts Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges automation in sql server 2008 Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:
Ole Automation Sql Server
Sign up runtime error '-2147217900' (80040e14)': automation error using where in the sql query from excel vba up vote 1 down vote favorite I am trying to connect to my sqlserver express 2005 from excel vba using the following (copied from some forum routine as i am not very into databases). It works perfect. As soon as I use WHERE in the
Sql Server Ole Automation Security Risks
sqlquery variable (already verified quotes double and single) i get runtime error '-2147217900' (80040e14)': automation error Similar routine that work pulling data from other people same thing. I appreciate deeply your help Thanks Sub ConnectTEST() ' Create a connection object. Dim cnPubs As ADODB.Connection Set cnPubs = New ADODB.Connection Dim sqlquery As String Dim rsPubs As ADODB.Recordset Set rsPubs = New ADODB.Recordset ' Provide the connection string. Dim strConn As String 'Use the SQL Server OLE DB Provider. strConn = "PROVIDER=SQLOLEDB;" sqlquery = "SELECT * FROM [Logisuite].[dbo].[EoWebStatus]" 'Connect to the Pubs database on the local server. strConn = strConn & "Server=SERVITRANSMAIn\SQLEXPRESS;Database=logisuite;Trusted_Connection=True;" 'Use an integrated login. strConn = strConn & "INTEGRATED SECURITY=sspi;" 'Now open the connection. cnPubs.Open strConn ' Create a recordset object. Set rsPubs = New ADODB.Recordset With rsPubs ' Assign the Connection object. .ActiveConnection = cnPubs ' Extract the required records. .Open sqlquery ' Copy the records into cell A1 on Sheet1. Sheet1.Range("A1").CopyFromRecordset rsPubs ' Tidy up .Close End With cnPubs.Close Set rsPubs = Nothing Set cnPubs = Nothing End Sub sql excel vba share|improve this question asked May 22 '13 at 20:49 user204136
Microsoft Tech Companion App Microsoft Technical Communities Microsoft Virtual Academy Script Center Server and sql server ole automation enabled Tools Blogs TechNet Blogs TechNet Flash Newsletter TechNet
Sql Server Ole Automation Procedures
Gallery TechNet Library TechNet Magazine TechNet Subscriptions TechNet Video TechNet Wiki Windows Sysinternals Virtual sql server sftp automation Labs Solutions Networking Cloud and Datacenter Security Virtualization Downloads Updates Service Packs Security Bulletins Windows Update Trials Windows Server 2012 R2 System Center 2012 http://stackoverflow.com/questions/16701347/runtime-error-2147217900-80040e14-automation-error-using-where-in-the-sql R2 Microsoft SQL Server 2014 SP1 Windows 8.1 Enterprise See all trials » Related Sites Microsoft Download Center TechNet Evaluation Center Drivers Windows Sysinternals TechNet Gallery Training Training Expert-led, virtual classes Training Catalog Class Locator Microsoft Virtual Academy Free Windows Server 2012 courses Free Windows 8 courses https://technet.microsoft.com/en-us/library/cc917670.aspx SQL Server training Microsoft Official Courses On-Demand Certifications Certification overview MCSA: Windows 10 Windows Server Certification (MCSE) Private Cloud Certification (MCSE) SQL Server Certification (MCSE) Other resources TechNet Events Second shot for certification Born To Learn blog Find technical communities in your area Support Support options For business For developers For IT professionals For technical support Support offerings More support Microsoft Premier Online TechNet Forums MSDN Forums Security Bulletins & Advisories Not an IT pro? Microsoft Customer Support Microsoft Community Forums United States (English) Sign in Home Library Wiki Learn Gallery Downloads Support Forums Blogs We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. SQL Server 2005 Technical Articles SQL Server 2005 SQL Server 2005 Resolving Common Connectivity Issues in SQL Server 2005 Analysis Services Connectivity Scenarios Resolving Common Connectivity Issues
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: OLE Automation Error Information - 0x80040220 Source: CDO.Message.1 Description: The "SendUsing" https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9ee0a7ac-6995-43a8-a5d0-ae8c049e8679/ole-automation-error-information-0x80040220-source-cdomessage1-description-the-sendusing?forum=sqldatabaseengine configuration value is invalid SQL Server > SQL Server Database Engine Question 0 Sign in to vote OLE Automation Error Information - 0x80040220 Source: CDO.Message.1 Description: The "SendUsing" configuration value is invalid We have a stored procedure that is used to send out mail. This stored procedure works fine on sql server 2005 on windows 2003. We created a new instance Sql server sql server 2008R2 on the same windows server 2003 to test our database before migration. And we get this error while using the same code And here is the stored procedure CREATE Procedure [dbo].[sp_SMTPMailNew_debug] @SenderName varchar(100), @SenderAddress varchar(100), @RecipientName varchar(100), @RecipientAddress varchar(100), @Subject varchar(200), @HtmlBody varchar(8000)=null, AS SET nocount on declare @oMail int --Object reference declare @resultcode int EXEC @resultcode = sp_OACreate 'CDO.Message', sql server ole @oMail OUT if @resultcode = 0 BEGIN EXEC @resultcode = sp_OASetProperty @oMail, 'From', @SenderAddress -- SELECT 'from ', @RESULTCODE EXEC @resultcode = sp_OASetProperty @oMail, 'To', @RecipientAddress -- SELECT 'to ', @RESULTCODE EXEC @resultcode = sp_OASetProperty @oMail, 'Subject', @Subject -- SELECT 'subject ', @RESULTCODE EXEC @resultcode = sp_OASetProperty @oMail, 'HtmlBody', @HtmlBody -- SELECT 'HTML' , @RESULTCODE EXEC @resultcode = sp_OAMethod @oMail, 'Fields.Update', NULL -- SELECT 'fields.update ', @RESULTCODE EXEC @resultcode = sp_OAMethod @oMail, 'Send', NULL exec sp_displayoaerrorinfo @omail, @resultcode EXEC sp_OADestroy @oMail END Anyone have any idea why it returns this error on sql server 2008r2 but not on sql server 2005 ( on the same windows server 2003 ) ? Tuesday, May 08, 2012 9:04 PM Reply | Quote Answers 0 Sign in to vote Hi M Trinh, Based on my research and your error message, the SendUsing value should be numeric normally it should most often be 2, unless you have an SMTP server installed on the same machine as your SQL Server. For more information please refer to http://www.microsoft.com/technet/scriptcenter/guide/