Subject | Re: [IBO] Escape characters break generated SQL |
---|---|
Author | mspencewasunavailable |
Post date | 2006-12-12T21:24:25Z |
--- In IBObjects@yahoogroups.com, "Jason Wharton" <supportlist@...>
wrote:
afterwards, though, I think, so I can continue to work.
wrote:
>referencing
> Looks like a definite bug. If text is escaped then whatever is
> that text should process it to remove the escaping. Should be aneasy fix.
> I added more characters to be escaped and its bringing to lightareas where
> escaping is being done that I am reading data without de-escapingthings.
> Likely that's due to the assumption that any character valid for anescaping for
> identifier used to not be escaped. I either need to remove
> characters valid to include in identifiers or fix theinconsistencies.
>the
> It would accelerate things for me if you sent me a sample app with
> problem.Ok, I'll do it forthwith. I'm going to revert back to Beta 7
>
> Jason
afterwards, though, I think, so I can continue to work.
>[mailto:IBObjects@yahoogroups.com]On
> > -----Original Message-----
> > From: IBObjects@yahoogroups.com
> > Behalf Of mspencewasunavailablein
> > Sent: Tuesday, December 12, 2006 2:09 PM
> > To: IBObjects@yahoogroups.com
> > Subject: [IBO] Escape characters break generated SQL
> >
> >
> > Between beta 7 and beta 11, you evidently introduced some sort of
> > character escaping which is interfering with things that were ok
> > beta 7:TIB_LocateCursor: "<TDBCustomer>.<TIBOTable>.<TIBOInternalDataset>.<T
> >
> > var
> > tblInvoice : TIBOTable;
> >
> > refers to a table that is defined like this:
> >
> > CREATE TABLE "ARINV"(
> > "Acc ID" INTEGER NOT NULL,
> > "Invoice #" VARCHAR(25) NOT NULL,
> > "Date" DATE NOT NULL,
> > "Sub Total" NUMERIC(12,2),
> > "Tax" NUMERIC(12,2),
> > "Freight" NUMERIC(12,2),
> > "Total" NUMERIC(12,2),
> > "Due Date" DATE,
> > (..and so forth, fields clipped for brevity)
> >
> > With a primary key:
> >
> > ALTER TABLE "ARINV"
> > ADD CONSTRAINT "PK_ARINV"
> > PRIMARY KEY ("Acc ID","Invoice #","Date");
> >
> > When I do this:
> >
> > tblInvoice.FindNearest([ID, nil, nil]);
> >
> > The table used to get positioned to the first invoice for that
> > account, but now I get an SQL error:
> >
> > ISC ERROR CODE:335544569
> >
> > ISC ERROR MESSAGE:
> > Dynamic SQL Error
> > SQL error code = -206
> > Column unknown
> > Invoice \#
> > At line 6, column 73
> >
> > STATEMENT:
> >
> > IB_LocateCursor>." stHandle=88 (ERROR)*/ )
> >
> >
> > STATEMENT:
> > TIBOInternalDataset: "<TDBCustomer>.
> >
> > SQL ERROR CODE:-206
> >
> > SQL ERROR MESSAGE:
> > Column does not belong to referenced table
> >
> > SELECT ARINV."Acc ID", ARINV."Invoice #", ARINV."Date"
> > FROM ARINV
> > WHERE (
> > ARINV."Acc ID" = ? /* ID */
> > )
> > AND ((("Acc ID" > ? /* LOC_0 */ ) OR (("Acc ID" = ? /* LOC_0
> > AND (("Invoice \#" > ? /* LOC_1 */ ) OR (("Invoice \#" = ? /*LOC_1
> > */ ) AND (("Date" >= ? /* LOC_2 */ )))))))
> > ORDER BY "Acc ID" ASC
> > , "Invoice \#" ASC
> > , "Date" ASC
> >
> >
> > The field named "Invoice #" is now "Invoice \#" in the generated
> > SQL. If I plug in values for all of the params, then FlameRobin
> > gives the same error. If I remove the backslashes as well, the
> > query works.
> >
> > Michael D. Spence
> > Mockingbird Data Systems, Inc.
>