Dim cn As New Connection, rs As New Recordset
Private Sub Command1_Click() Dim cnStr, sql cnStr = "Data Source=" & Text1 & "; Provider=MSDataShape; Data Provider=Microsoft.Jet.OLEDB.4.0;" cn.Open cnStr
sql = "SHAPE {SELECT * FROM Publishers} AS cmdPublishers APPEND ({SELECT * FROM Titles} AS cmdTitles RELATE 'PubID' TO 'PubID') AS cmdTitles" rs.Open sql, cn Set MSHFlexGrid1.DataSource = rs rs.Close cn.Close End Sub |