Volevo sapere se c'è un modo per inserire il doppio RELATE nella costruzione dello SHAPE
L'esempio corrente è con singolo RELATE, ma se volessi inserire due campi come relazione ????
Private Sub Command1_Click()
Dim cn As ADODB.Connection
Dim rsPub As ADODB.Recordset
Dim SQL As String
Set cn = New ADODB.Connection
Set rsPub = New ADODB.Recordset
cn.Provider = "MSDataShape"
cn.Open "dsn=MyPubs;uid=sa;pwd=;database=pubs"
SQL = "SHAPE {SELECT * FROM publishers} " & _
"APPEND (( SHAPE {SELECT * FROM titles} AS Command2 " & _
"APPEND ({select * from titleauthor} AS Command3 " & _
"RELATE 'title_id' TO 'title_id')) " & _
"RELATE 'pub_id' TO 'pub_id')"
rsPub.Open SQL, cn, adOpenStatic, adLockReadOnly, adCmdText
Set DataReport1.DataSource = rsPub
DataReport1.DataMember = ""
DataReport1.Show 1
rsPub.Close
cn.Close
Set rsPub = Nothing
Set cn = Nothing
End Sub
Avete un'idea??
GRAZIE