At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!
Public Sub TotalPrivateDaysFromRtoA() Dim cnn As Object Dim CRecordset3 As Object ' Create a connection object Set cnn = CreateObject("ADODB.Connection") ' Connect to the database cnn.Provider = "SQLOLEDB" cnn.Open "Server=vaio;Database=Product;User Id=admin;Password=asd345po" 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 sp_TotalPriceperMoth", cnn, adOpenDynamic, adLockPessimistic Sheets("Sheet1").[B4].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.