Subject | Re: [IBO] TIBOTable and field names that require quoting. |
---|---|
Author | mspencewasunavailable |
Post date | 2006-09-26T23:59:29Z |
--- In IBObjects@yahoogroups.com, "mspencewasunavailable"
<firebird@...> wrote:
In IBODataset.pas:
132c132
< IBODataset_orig;
---
< Result := FindField( tmpCol.FieldName );
---
< Result := InternalDataset.SQLOrderLinks.LinkIndex[
Field.FieldName ] >= 0;
---
124c124
< IB_Components_orig;
---
< tmpItem := Trim( GetCharValues( BDataset.SysFieldNames
[tmpCol.FieldNo] ))
---
<firebird@...> wrote:
>poster
> --- In IBObjects@yahoogroups.com, Geoff Worboys <geoff@> wrote:
> >
> > Hi Michael,
> >
> > ...
> > > But the SQL generated doesn't account for the quoting on
> > > the fields
> > ...
> > > SELECT ALL SCHED$.*
> > > FROM SCHED$
> > > WHERE SCHED$."Acc ID" = ? /* Acc */ ID
> > > AND SCHED$."Serv ID" = ? /* Serv */ ID
> > > ORDER BY SCHED$."Acc ID" ASC
> > > , SCHED$."Serv ID" ASC
> >
> > What release of IBObjects?
> >
> > I hit a similar problem and Jason has fixed it in the 4.6A
> > release of IBO. So I am wondering whether that fix will have
> > solved your problem or not. I have some quite similar
> > queries in my apps (using TIB_* components, not TIBO*
> > components) and have not hit the problem again since 4.6A.
> >
> > --
> > Geoff Worboys
> > Telesis Computing
> >
>
> D'OH!
>
> 4.6.B, according to the Object Inspector, but now that you mention
> it, this isn't a pristine version. There were a host of other
> problems which were solved by some patches I got from another
> (Ramil [khabibr@...]) who said he'd sent them directly to Jason,they're
> but that Jason was away at the time. See this message: "Re[2]:
> [IBO] Quoted fields seem to be broken in TIBODataset when
> involved in indexing" around 7/31/2006. I had to apply these toget
> anywhere at all. While they look like fairly extensive patches, acouple
> diff shows that they're actually only a couple of lines in a
> of places. If it's helpful, I can produce a diff for you betweenreally
> the released source and what I'm using.
>
> I'd be surprised if these patches had any affect on the SQL that
> gets generated when a master dataset is used (although I've
> certainly been surprised before). I do have to apologize for the
> fact that I'd forgotten that I was using a patched version but
> without the patches, most of my code won't run at all. I was
> hoping they'd be included in a future version. Tomorrow, I'll tryHere are the differences:
> to make time to see if I can get a little more info and maybe work
> up a patch for the problem instead of just working around it. I'm
> betting it's not a big deal.
>
> Michael D. Spence
> Mockingbird Data Systems, Inc.
>
In IBODataset.pas:
132c132
< IBODataset_orig;
---
> IBODataset;4664c4664,4667
< Result := FindField( tmpCol.FieldName );
---
> // Orig5511c5514,5519
> // Result := FindField( tmpCol.FieldName );
> // My change
> Result := FindField( tmpCol.BDEFieldName );
< Result := InternalDataset.SQLOrderLinks.LinkIndex[
Field.FieldName ] >= 0;
---
> // OrigField.FieldName ] >= 0;
> // Result := InternalDataset.SQLOrderLinks.LinkIndex[
> // Ramil's changeIn IB_Components.pas
> Result := InternalDataset.SQLOrderLinks.LinkIndex[
> InternalDataset.Fields[Field.FieldNo - 1].FieldName ] >= 0
>
124c124
< IB_Components_orig;
---
> IB_Components;30194c30194,30203
< tmpItem := Trim( GetCharValues( BDataset.SysFieldNames
[tmpCol.FieldNo] ))
---
> // OrigAs you can see, they're fairly minor.
> // tmpItem := BDataset.SysFieldNames[tmpCol.FieldNo];
> // Ramil's Change
> begin
> tmpItem := BDataset.SysFieldNames[tmpCol.FieldNo];
> if not IsLitCriteria( tmpItem, '"' ) then
> tmpItem := GetCharValues( tmpItem );
> tmpItem := Trim( tmpItem );
> end
> // End Ramil's Change