Bug #69

Pipes in returning SQL table

Added by Pierre Marc almost 12 years ago. Updated almost 12 years ago.

Status:ClosedStart date:07/23/2012
Priority:NormalDue date:
Assignee:Pierre Marc% Done:

100%

Category:Application Platform
Target version:4.7.004
Operating System:Any Tested:Yes
Version:

Description

When doing a SQL command for INSERT or REPLACE and using a pipe "|" character within the VALUES to be inserted the resulting select results in to NVDATA objects for the cell where the pipe was inserted - consider the following perl procedure:

use strict;
NV::Command("NV_CMD=|FILEDB:OPEN| FILENAME=|C:\\MYDB.DB| NAME=|MyDB|");
NV::Command("NV_CMD=|FILEDB:SQL| NAME=|MyDB| SQL=|CREATE TABLE TEST (MYIND INT, MYFIELD INT, UNIQUE(MYIND) ON CONFLICT REPLACE)| NV_NO_ERROR=|YES|");
NV::Command("NV_CMD=!FILEDB:SQL! NAME=!MyDB! SQL=!INSERT OR REPLACE INTO TEST (MYIND,MYFIELD) VALUES (1,'that=|that|')!");
NV::Command("NV_CMD=|FILEDB:SQL| NAME=|MyDB| SQL=|SELECT * FROM TEST|");
NV::Command("NV_CMD=|FILEDB:CLOSE| NAME=|MyDB|");
The resulting table is shown as:
  - <NVOBJ name="records" type="TABLE">
  <NVDESCRIPTION /> 
  <NVSIZE>1</NVSIZE> 
  <NVPRIMARY case-sensitive="no" /> 
  <NVCOLDESC name="MYIND" type="ALPHANUMERIC" /> 
  <NVCOLDESC name="MYFIELD" type="ALPHANUMERIC" /> 
    - <NVROW>
        - <NVCOL name="MYIND">
              <NVDATA>1</NVDATA> 
          </NVCOL>
        - <NVCOL name="MYFIELD">
              <NVDATA>that=</NVDATA> 
              <NVDATA>that</NVDATA> 
          </NVCOL>
      </NVROW>
  </NVOBJ>


It seems that the pipe "|" character has been seen internally by Nirva as a separator of lines in the table's cell - of course the "|" is the default value for LINESEP but I was wondering is there a way to change this on the FILEDB:SQL command so a different delimiter is used when the command generates the table?

History

#1 Updated by Pierre Marc almost 12 years ago

  • Description updated (diff)

This is a bug that will be corrected in Nirva 4.7.004

#2 Updated by Pierre Marc almost 12 years ago

  • Status changed from New to In Progress

#3 Updated by Pierre Marc almost 12 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Tested changed from No to Yes

#4 Updated by Pierre Marc almost 12 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF