Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.
Sub QueryRecords() Dim cnn As ADODB.Connection Dim rst1 As New ADODB.Recordset Dim sConnString As String Dim strSQL As String Set cnn = New ADODB.Connection sConnString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" & _ "Persist Security Info=False;" & _ "Initial Catalog=Merch;" & _ "Data Source=ifppa-db" cnn.Open sConnString strSQL = "SELECT ID, SolnName FROM Solutions" Debug.Print strSQL Set rst1 = New ADODB.Recordset rst1.Open strSQL, cnn Debug.Print rst1.RecordCount cnn.Close Set cnn = Nothing Set rst1 = Nothing End Sub
USE [Merch] GO /****** Object: Table [dbo].[Solutions] Script Date: 10/29/2013 6:44:37 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Solutions]( [ID] [int] IDENTITY(1,1) NOT NULL, [SolnName] [varchar](max) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO SET ANSI_PADDING OFF GO
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
17 Experts available now in Live!