<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1528" name=GENERATOR>
<STYLE>@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=795170018-20042006><FONT face=Arial color=#0000ff size=2>Hi 
Mark,</FONT></SPAN></DIV>
<DIV><SPAN class=795170018-20042006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=795170018-20042006><FONT face=Arial color=#0000ff size=2>It has 
to be a syntax error. I use commas all the time.&nbsp; Could you provide the 
whole virtual layer definition?</FONT></SPAN></DIV>
<DIV><SPAN class=795170018-20042006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=795170018-20042006><FONT face=Arial color=#0000ff 
size=2>Stephane</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>De&nbsp;:</B> UMN MapServer Users List 
  [mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <B>De la part de</B> Mark 
  Adams<BR><B>Envoyé&nbsp;:</B> 20 avril 2006 10:38<BR><B>À&nbsp;:</B> 
  MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Objet&nbsp;:</B> [UMN_MAPSERVER-USERS] 
  commas in CONNECTION string cause MapServer to fail<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi 
  all,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">We're working on an application 
  that uses a virtual spatial layer coming from an Oracle database using WKT 
  geometry. For performance and presentation reasons, we are setting the 
  CONNECTION string dynamically based on the user's selected parameters on a 
  query form. The CONNECTION is being set by including the OGR virtual layer 
  definition in-line, such as:<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">CONNECTION 
  "&lt;OGRVRTDataSource&gt;<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; &lt;OGRVRTLayer 
  name='Reference_Query'&gt;<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;SrcDataSource&gt;ODBC:system/normin@normin_dev&lt;/SrcDataSource&gt; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;SrcSQL&gt;SELECT * FROM MINFWHSE_P1.MINFT_WH2_REFER_REFERENCE WHERE 
  MINFWHSE_P1.MINFT_WH2_REFER_REFERENCE.C_REFER_REFERENCE_NBR IS NOT 
  NULL&lt;/SrcSQL&gt;<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;GeometryType&gt;wkbPolygon&lt;/GeometryType&gt; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;GeometryField encoding='WKT' field='GEOMETRY'/&gt; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; 
  &lt;/OGRVRTLayer&gt;<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&lt;/OGRVRTDataSource&gt;"<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The above example works fine. 
  However, when we include commas in the SrcSQL element, such as "SELECT 
  FIELD1,FIELD2 FROM TABLE1,TABLE2", mapserver crashes 
  with:<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">"<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[MapServer Error]: 
  msOGRFileOpen(): Open failed for OGR connection 
  `&lt;OGRVRTDataSource&gt;<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; &lt;OGRVRTLayer 
  name='Reference_Query'&gt;<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;SrcDataSource&gt;ODBC:system/normin@normin_dev&lt;/SrcDataSource&gt; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;SrcSQL&gt;SELECT 
  MINFWHSE_P1.MINFT_WH2_REFER_REFERENCE.C_REFER_REFERENCE_NBR'.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Parse error at EOF, not all 
  elements have been closed,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">starting with 
  SrcSQL<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">"<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is this behaviour expected, i.e. 
  are commas disallowed in the MAP file, and if so is there a way to escape 
  them? I can put the exact same string in an OVF file and set the CONNECTION to 
  that file, and then it works, so I know there is nothing wrong with the string 
  itself.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-CA 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA 
  style="FONT-SIZE: 10pt; COLOR: navy">------------------------------</SPAN></FONT><SPAN 
  lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA style="FONT-SIZE: 10pt; COLOR: navy">Mark Adams</SPAN></FONT><SPAN 
  lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA style="FONT-SIZE: 10pt; COLOR: navy">Senior Analyst &amp; Project 
  Manager</SPAN></FONT><SPAN lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA style="FONT-SIZE: 10pt; COLOR: navy">Cuesta Systems (DPRA 
  Canada)</SPAN></FONT><SPAN lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA style="FONT-SIZE: 10pt; COLOR: navy">5230 South Service 
  Road</SPAN></FONT><SPAN lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA style="FONT-SIZE: 10pt; COLOR: navy">Burlington, ON L7L 
  5K2</SPAN></FONT><SPAN lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA style="FONT-SIZE: 10pt; COLOR: navy">Phone: 905-333-4544 
  x14</SPAN></FONT><SPAN lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA style="FONT-SIZE: 10pt; COLOR: navy">Fax: 
  905-333-0455</SPAN></FONT><SPAN lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN 
  lang=EN-CA style="FONT-SIZE: 10pt; COLOR: navy">Email: 
  mark.adams@dpra.com</SPAN></FONT><SPAN lang=EN-CA><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN lang=EN-CA 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>