Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two connection strings in one query
Message
From
15/01/2006 01:07:27
 
 
To
15/01/2006 00:35:32
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01086887
Message ID:
01086904
Views:
33
>Could you briefly post some of the code? I'm still not sure what you're doing and how you coded it (I'm curious).

Here is an example:
    ' Get the VFP app
    Public Shared Function VFPApp() As String
        Dim loDataProvider As Framework.Data = New Framework.Data()
        If loDataProvider.SQLExec("SELECT VFPApp.Numero,VFPApp.Creation,VFPApp.Modifier AS Updated," + _
         "VFPApp.Title,VFPApp.NumberTabl,VFPApp.SizeTable,VFPApp.NbreUser,VFPApp.Simulta," + _
         "VFPApp.DateStart,Version.Name AS Version,VFPApp.WorldWide," + _
         "VFPApp.Notes,VFPApp.Web,IIF(NOT ISNULL(Pays.Pays),Pays.Pays,SPACE(20)) AS Pays," + _
         "IIF(NOT ISNULL(Province.Desc),Province.Desc,'') AS State," + _
         "IIF(NOT ISNULL(Member.Prenom),Member.Prenom,'') AS FirstName," + _
         "IIF(NOT ISNULL(Member.Nom),Member.Nom,'') AS LastName " + _
         "FROM VFPApp " + _
         "LEFT JOIN " + lcData + "\Member ON VFPApp.NoMember=Member.Numero " + _
         "LEFT JOIN " + lcData + "\Pays ON VFPApp.NoCountry=Pays.Numero " + _
         "LEFT JOIN " + lcData + "\Province ON VFPApp.NoProvince=Province.Numero " + _
         "INNER JOIN " + lcData + "\Version ON VFPApp.NoVersion=Version.Numero", _
          Framework.App.aConnection(3)) = False Then
            Throw New System.Exception("Unable to retrieve the data. " + Framework.App.cError)
        End If
        Return Framework.DataXML.DataSetToXml(loDataProvider.oDataSet)
    End Function
where VFPApp comes from the declared connection and the JOINed tables come from a fully qualified path. I can use this approach because they are local. But, as I mentioned, otherwise I would have to use something like OPENROWSET().
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform