如何解决我正在尝试合并2 dataview但我收到一个错误
这是我得到的错误:
Additional information: <target>.Credit et <source>.Credit ont des propriétés en conflit : incompatibilité de propriété DataType.
这是我的代码
Public Sub Reg_GetRsData()
Dim sRs,sRs1 As String
'sRs = "Select GR.Codeclt,GR.Client,GR.Modereg,GR.Echeance,GR.Datereg,SUM(FC.MontantTTC) As Debit,SUM(GR.Montant) As Credit,SUM(FC.MontantTTC)-SUM(GR.Montant) As Solde,Gr.Libelle " _
' & "from GestionReg GR,LV_Fact_Client FC "
'sRs = sRs & "where 1=1 and Gr.Codeclt = FC.Codeclt " & fGetRsCondition()
'' RsData = New DataView
'sRs = sRs & " group by GR.Codeclt,Gr.Libelle "
sRs = "select (GR.Codeclt),GR.ModeReg,Gr.Libelle,'' As Credit " _
& "from GestionReg GR "
sRs = sRs & "where 1=1 " & fGetRsCondition()
RsData1 = New DataView
RsData1 = c_DataSql.fGet_Data_ViewAccess(sRs)
sRs1 = " select '' As Codeclt,'' As Client,'' As ModeReg,'' As Echence,'' As Datereg,'' As Libelle,MontantTTC As Credit" _
& " From LV_Fact_Client "
sRs1 = sRs1 & "where 1=1 and Codeclt = '" & fDuplicateCote(Codecl) & "'"
RsData2 = New DataView
RsData2 = c_DataSql.fGet_Data_ViewAccess(sRs1)
Dim iRow As Integer
iRow = 0
' SELECT LV_Fact_CLient.Codeclt,LV_Fact_CLient.DateFact,LV_Fact_CLient.NFact,LV_Fact_CLient.client,LV_Fact_CLient.MontantTTC,[modereg] AS Expr1,[Libelle] AS Expr2,[Echeance] AS Expr3
'FROM LV_Fact_CLient;
'union
'SELECT Gestionreg.Codeclt,Gestionreg.Date_imp,Gestionreg.Nreg,Gestionreg.client,Gestionreg.Montant,Gestionreg.ModeReg,Gestionreg.Libelle,Gestionreg.Echeance
'FROM Gestionreg
'WHERE (((Gestionreg.Date_imp)<>""));
RsData1.Table.Merge(RsData2.Table,MissingSchemaAction.Ignore)
With frmConsultsoldeclt.FlexGrid
.DataSource = RsData2
End With
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。