Azure recupera un set de loggings en blanco

Actualmente estoy tratando de recuperar un set de loggings en Excel desde una database alojada en Azure.

Recupera el recuento correcto de loggings, pero los escribe como una pestaña, en lugar de los datos correctos. Puedo confirmar que la consulta solicitada en el código está recuperando los loggings cuando consulto la database.

Código a continuación:

Dim cnt As New ADODB.Connection Dim rst As New ADODB.Recordset Dim xlApp As Object Dim iLastCellReference As Integer Dim recArray As Variant Dim strDB As String Dim fldCount As Integer Dim recCount As Long Dim iCol As Integer Dim iRow As Integer Dim sRange As String ' Set the string to the path of your database strDB = Connection.Range("A2").Value On Error GoTo ErrorHandler ' Open connection to the database cnt.Open strDB ' Open recordset based on Project_Information table rst.Open "Select DISTINCT Project_Current_Name From psruser.Project_Master_Table where Project_Enabled = 'True'", cnt 'rst.Open "Select DISTINCT Project_Number From mruser.Project_Information", cnt If Not (rst.BOF And rst.EOF) Then ' Create an instance of Excel and add a workbook Set xlApp = CreateObject("Excel.Application") ' Copy field names to the first row of the worksheet fldCount = rst.Fields.Count For iCol = 1 To fldCount Parameters.Cells(82, iCol).Value = rst.Fields(iCol - 1).Name Next ' Below is to get the number of rows ' Copy recordset to an array recArray = rst.GetRows 'Note: GetRows returns a 0-based array where the first 'dimension contains fields and the second dimension 'contains records. We will transpose this array so that 'the first dimension contains records, allowing the 'data to appears properly when copied to Excel ' Determine number of records recCount = UBound(recArray, 2) + 1 '+ 1 since 0-based array ' Copy the recordset to the worksheet, starting in cell A132 ' Check the array for contents that are not valid when ' copying the array to an Excel worksheet For iCol = 0 To fldCount - 1 For iRow = 0 To recCount - 1 ' Take care of Date fields If IsDate(recArray(iCol, iRow)) Then recArray(iCol, iRow) = Format(recArray(iCol, iRow)) ' Take care of OLE object fields or array fields Else If IsArray(recArray(iCol, iRow)) Then recArray(iCol, iRow) = "Array Field" End If End If 'Next iRow 'next record Next iRow 'Next iCol 'next field Next iCol ' Transpose and Copy the array to the worksheet, starting in cell A132 Parameters.Cells(82, 1).Resize(recCount, fldCount).Value = _ TransposeDim(recArray) ' Close ADO objects rst.Close cnt.Close Set rst = Nothing Set cnt = Nothing 

Resulta que era la cadena de connection, las cadenas generadas por Windows Azure son, en el mejor de los casos, escamosas, permitiría la inserción y actualización de loggings, y la ejecución de procedimientos almacenados, pero no una consulta analizada.

¡Le recomiendo encarecidamente que escriba sus propias cadenas de connection y que no use las de Azure!