Sergey,
Here is the commands I used to open the second alias:
lcDriver=[Driver=SQL Server;]
lcServer=[Server=SQLSERVER;]
lcTrust=[Trusted_Connection=Yes;]
lcDatabase=[Database=Membership]
gcConnStr=lcDriver+lcServer+lcTrust+lcDatabase
gnConn=SQLSTRINGCONNECT(gcConnStr)
gcSql="SELECT * from dbo.t_MMB_Membership MMB INNER JOIN dbo.t_MAD_Address_Book MAD ON MMB.tiMMBmbrno=MAD.tiMADmbrno INNER JOIN dbo.t_MNM_Names MNM on MMB.tiMMBmbrno=MNM.tiMNMmbrno LEFT OUTER JOIN dbo.t_MPD_Payments MPD on MMB.tiMMBmbrno=MPD.tiMPDmbrno LEFT OUTER JOIN dbo.t_MCD_Commodity_Data MCD on MMB.tiMMBmbrno=MCD.tiMCDmbrno LEFT OUTER JOIN dbo.t_MMN_Member_Notes MMN on MMB.tiMMBmbrno=MMN.tiMMNmbrno LEFT OUTER JOIN dbo.t_MNC_Nationwide_Coverages MNC on MMB.tiMMBmbrno=MNC.tiMNCmbrno LEFT OUTER JOIN dbo.t_MNS_Nationwide_Signups MNS on MMB.tiMMBmbrno=MNS.tiMNSmbrno LEFT OUTER JOIN dbo.t_MCN_Contributions MCN on MMB.tiMMBmbrno=MCN.tiMCNmbrno LEFT OUTER JOIN dbo.t_MCM_Committee_Members MCM on MMB.tiMMBmbrno=MCM.tiMCMmbrno LEFT OUTER JOIN dbo.t_MEM_Email_Address MEM on MMB.tiMMBmbrno=MEM.tiMEMmbrno LEFT OUTER JOIN dbo.t_MTP_Telephone_Book MTP on MMB.tiMMBmbrno=MTP.tiMTPmbrno LEFT OUTER JOIN dbo.t_MPC_Producers_Club MPC on MMB.tiMMBmbrno=MPC.tiMPCmbrno LEFT OUTER JOIN dbo.t_MSV_Services MSV on MMB.tiMMBmbrno=MSV.tiMSVmbrno WHERE MMB.tiMMBmbrno=?gcMemberno ORDER BY MNM.tiMNMmbrno,MNM.ttMNMnincr"
IF gnconn > 0
=SQLEXEC(gnConn,gcSql,'sqlresult')
Thisform.r_cMasterAlias='sqlresult'
IF RECCOUNT(Thisform.r_cMasterAlias)<>0
USE DBF(Thisform.r_cMasteralias) IN 0 AGAIN ALIAS sqlresult2
....
ENDIF
ENDIF
Kay
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only