We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Public Sub GetPrivateDailyCensus() Dim cnn As Object Dim CRecordset3 As Object 'Private Avg ' Create a connection object Set cnn = CreateObject("ADODB.Connection") ' Connect to the database cnn.Provider = "SQLOLEDB" cnn.Open "Server=Vaio;Database=Products;User Id=admin;Password=password" If cnn.State <> 1 Then MsgBox "Could not connect to the database" Exit Sub End If ' Open recordset BeginNextRecordset Set CRecordset3 = CreateObject("ADODB.Recordset") CRecordset3.Open "EXEC spGetPrivateTotalDailyCensusNew", cnn, adOpenDynamic, adLockPessimistic Sheets("WeeklyCensus").[D4].CopyFromRecordset CRecordset3 cnn.Close Set cnn = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.