Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two connection strings in one query
Message
From
15/01/2006 10:03:16
 
 
To
15/01/2006 01:07:27
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01086887
Message ID:
01086934
Views:
41
Hmmm ... I guess as long as that path is accessible it will work. Are these free tables or are they in a DBC?

BTW, OPENROWSET() is new to VS 2005 (I wasn't aware of it until you mentioned it).

~~Bonnie


>>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().
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform