M
MosheS Singer
Guest
The following example is how the Recordset in VB6 works to relate multiple queries in one report. It works in VB.Net if the connection is OLE connection to an Access database.
However, if the connection to an SQL database, it will not work. in VB 2019.
Dim TtlS As String
TtlS = "SHAPE {" & MainSql & "} "
TtlS &= "APPEND ({" & PrprSql & "} AS PrprRS "
TtlS &= "RELATE PrId TO PrId) AS PrprRS, "
TtlS &= "({" & AcntSql & "} AS RsAcnt "
TtlS &= "RELATE Acnt TO Account) AS RsAcnt, "
TtlS &= "({" & CrgSql & "} AS RsCrrg "
TtlS &= "RELATE InvT TO -+) AS RsCrrg"
Provider=MSDataShape;Data Provider==SQLOLEDB
What would be a good replacement to accomplish the connection of multiple tables in one report?
Continue reading...
However, if the connection to an SQL database, it will not work. in VB 2019.
Dim TtlS As String
TtlS = "SHAPE {" & MainSql & "} "
TtlS &= "APPEND ({" & PrprSql & "} AS PrprRS "
TtlS &= "RELATE PrId TO PrId) AS PrprRS, "
TtlS &= "({" & AcntSql & "} AS RsAcnt "
TtlS &= "RELATE Acnt TO Account) AS RsAcnt, "
TtlS &= "({" & CrgSql & "} AS RsCrrg "
TtlS &= "RELATE InvT TO -+) AS RsCrrg"
Provider=MSDataShape;Data Provider==SQLOLEDB
What would be a good replacement to accomplish the connection of multiple tables in one report?
Continue reading...