<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6487.1">
<TITLE>Multiple DSN Problem</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi there,</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">I was wondering if anyone has any experience with executing select statements using two different DSNs simultaneously. For my work, I require functionality similar to the following: "select a.* from tablename1 a, tablename2 b where a.id=b.id and b.filter='t'" , where tablename1 and tablename2 are from 2 DIFFERENT DSNs. Both DSNs are to be accessed via a realtime connection to a MS Access 2000 database from a linux host via the FREETDS drivers. I currently have both DSNs working independently in 2 test layers (with no errors) using the required fields. Here's the .ovf file used for the selection queue from the MS Access 2000 databases.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Database1:</FONT>
<BR><FONT SIZE=2 FACE="Arial">-----------------</FONT>
<BR><FONT SIZE=2 FACE="Arial"><OGRVRTDataSource></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <OGRVRTLayer name="Layer1Name"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <SrcDataSource>ODBC:UserName/Password@DSN1Name</SrcDataSource></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <SrcSQL>select statement here</SrcSQL></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <GeometryType>wkbPoint</GeometryType></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <GeometryField encoding="PointFromColumns" x="longitude" y="lati</FONT>
<BR><FONT SIZE=2 FACE="Arial">tude"/></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </OGRVRTLayer></FONT>
<BR><FONT SIZE=2 FACE="Arial"></OGRVRTDataSource></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Database2:</FONT>
<BR><FONT SIZE=2 FACE="Arial">----------------</FONT>
<BR><FONT SIZE=2 FACE="Arial"><OGRVRTDataSource></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <OGRVRTLayer name="Layer2Name"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <SrcDataSource>ODBC:UserName/Password@DSN2Name</SrcDataSource></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <SrcSQL>select statement here</SrcSQL></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <GeometryType>wkbPoint</GeometryType></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <GeometryField encoding="PointFromColumns" x="longitude" y="lati</FONT>
<BR><FONT SIZE=2 FACE="Arial">tude"/></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </OGRVRTLayer></FONT>
<BR><FONT SIZE=2 FACE="Arial"></OGRVRTDataSource></FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">What I require is a .ovf file which allows for 2 SrcDataSource(s). I've attempted to add an additional <SrcDataSource> tag followed by the connection information to the second database to the first .ovf file, however I consistently get no points found… even if I don't use the data. Are there any known ways of accomplishing this task? If not, I'll probably have to extract the necessary fields from Layer2 in a file on the local machine, and then use either javascript or php to filter the results from Layer1. Any comments, suggestions, and related questions would be greatly appreciated. Also, as I'm unsure whether this would be considered more of a Chameleon or Mapserver problem, I've posted it to both mailing lists.</FONT></P>
<P ALIGN=CENTER><B><I><FONT SIZE=2 FACE="Arial">Steven D'Cruz</FONT></I></B></P>
<P ALIGN=CENTER><B><I><FONT SIZE=2 FACE="Arial">Steven.D'Cruz@ec.gc.ca</FONT></I></B></P>
<P ALIGN=CENTER><B><I><FONT SIZE=2 FACE="Arial">(GIS) Web Developer</FONT></I></B></P>
<P ALIGN=CENTER><B><I><FONT SIZE=2 FACE="Arial">Environment Canada</FONT></I></B><I></I></P>
</BODY>
</HTML>