Dim strSqlInsert As String = "insert into TbMeterData(MeterId,DataDateTime,DataAPhaseCurrent,DataBPhaseCurrent,DataCPhaseCurrent,DataAverageCurrent,DataAPhaseVoltage,DataBPhaseVoltage,DataCPhaseVoltage,DataAverageVoltage,DataABPhaseLineVoltage,DataBCPhaseLineVoltage,DataACPhaseLineVoltage,DataAverageLineVoltage,DataTotalActivePower,DataTotalReactivePower,DataTotalApparentPower,DataAveragePowerFactor,DataFrequency,DataPositiveActiveElectricEnergy,DataReverseActiveElectricEnergy,DataPositiveReactiveElectricEnergy,DataReverseReactiveElectricEnergy) values('" & MeterId(j) & "','" & dateTime & "','" & DataAPhaseCurrent & "','" & DataBPhaseCurrent & "','" & DataCPhaseCurrent & "','" & DataAverageCurrent & "','" & DataAPhaseVoltage & "','" & DataBPhaseVoltage & "','" & DataCPhaseVoltage & "','" & DataAverageVoltage & "','" & DataABPhaseLineVoltage & "','" & DataBCPhaseLineVoltage & "','" & DataACPhaseLineVoltage & "','" & DataAverageLineVoltage & "','" & DataTotalActivePower & "','" & DataTotalReactivePower & "','" & DataTotalApparentPower & "','" & DataAveragePowerFactor & "','" & DataFrequency & "','" & DataPositiveActiveElectricEnergy & "','" & DataReverseActiveElectricEnergy & "','" & DataPositiveReactiveElectricEnergy & "','" & DataReverseReactiveElectricEnergy & "')"
values之前其实用空格加下划线可以换,但是后面的也这样换却不行……
vb.net 换行?
------解决方案--------------------------------------------------------
Dim s As String = "a" & _
"b"