I have got the code shown below which is reading rows from a database with some formatting. I need to output this in a file. How should I do this ?
Dim oCmd As New SqlCommand("sp_DataFromDB", objConn)
oCmd.CommandType = CommandType.StoredProcedure
Dim sb As New StringBuilder()
Dim sw As New StringWriter(sb)
Dim objRdr As SqlDataReader = oCmd.ExecuteReader()
Dim sRuta As String
Dim writer As JsonWriter = New JsonTextWriter(sw)
writer.Formatting = Formatting.Indented
While objRdr.Read()
writer.WriteStartObject()
writer.WritePropertyName("codigoPropiedad")
writer.WriteValue(objRdr("Pr_Ficha_ACP"))
writer.WritePropertyName("Operacion")
writer.WriteValue(objRdr("sTipoOperacion"))
writer.WriteP ...
Go to the complete details ...