I agree that the best thing would be to fix the dialect. Based on what
I have described so far do you have any pointers or suggestions at
specifically what I should be looking at in the dialect? You mentioned
that the issue is the dialect yet the method BindParameterValues takes
in a starting index value but never uses it and instead passes 0 to
the next method. Perhaps you have some insight on that as well?

Thanks





On Mar 29, 12:16 pm, Fabio Maulo <[email protected]> wrote:
> Do what you want... I hope you will have time to maintain your loader.cs
> instead implement and share the dialect.
>
> 2010/3/29 brianw <[email protected]>
>
>
>
>
>
> > The Sybase11Dialect  error actually turned out to be that particular
> > dialect creates outer joins that are no longer supported in SQL
> > Anywhere 11.
>
> > The other Sybase 11 dialect I tried is from here
>
> >http://iablog.sybase.com/paulley/2009/09/revised-sql-anywhere-nhibern....
> > (SQLAnywhere11Dialect). This is the one that has the error with the
> > SetMaxRowCounts.
>
> > This may be the place I need to make changes but to me the changes are
> > not obvious without getting a whole lot deeper than I have the
> > inclination to do. I am just trying to use this stuff not write
> > nhibernate and dialects. As long as my dialect returns true for
> > BindLimitParametersFirst, SupportsLimitOffset and
> > SupportsVariableLimit which it does  then this code in loader.cs will
> > wipe out my limit parameter since the BindParameterValues call does
> > not use the colIndex that is passed in.
>
> > if (useLimit && dialect.BindLimitParametersFirst)
> > {
> >  colIndex += BindLimitParameters(command, colIndex, selection,
> > session);
> > }
>
> > colIndex += BindParameterValues(command, queryParameters, colIndex,
> > session);
>
> > I suppose in the SQLAnywhere11Dialect I have to either change
> > GetLimitString or the other settings to get the correct combination. I
> > think at this point I will just leave my change in loader.cs in and
> > worry about changing the dialect later.
>
> > On Mar 29, 10:22 am, Fabio Maulo <[email protected]> wrote:
> > > The place where change is the dialect and nothing more than the dialect.
>
> > > 2010/3/29 brianw <[email protected]>
>
> > > > I am using Nhibernate 2.1.2 with Sybase 11. Using Sybase11Dialect I
> > > > get sql errors using SetMaxResults. The same code works fine with
> > > > SybaseASA10Dialect. The Sybase11 dialect adds a parameter for the TOP
> > > > value whereas the SybaseASA10Dialect updates the sql directly with
> > > > Select TOP 500 starting at 1. The issues appears to be in
> > > > PrepareQueryCommand in loader.cs. The count parameter is set correctly
> > > > in BindLimitParameters but then it gets wiped out in the next call
> > > > which is to BindParameterValues. BindParameterValues is getting the
> > > > value of 1 for the next parameter to bind which is correct but the
> > > > method itself calls queryParameters.BindParameters with a hardcoded
> > > > zero instead of the passed in starting parameter. This causes the
> > > > first parameter which is the count to get set to whatever the next
> > > > parameter is supposed to be.
>
> > > >  queryParameters.BindParameters(statement, GetNamedParameterLocs, 0,
> > > > session);
> > > > perhaps should be
> > > >  queryParameters.BindParameters(statement, GetNamedParameterLocs,
> > > > startIndex, session);
>
> > > > I am reluctant to make this change in my nhibernate code as I really
> > > > don't know the full impact of the change.
>
> > > > To unsubscribe from this group, send email to nhibernate-development+
> > > > unsubscribegooglegroups.com or reply to this email with the words
> > "REMOVE
> > > > ME" as the subject.
>
> > > --
> > > Fabio Maulo- Hide quoted text -
>
> > > - Show quoted text -
>
> > To unsubscribe from this group, send email to nhibernate-development+
> > unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> > ME" as the subject.
>
> --
> Fabio Maulo- Hide quoted text -
>
> - Show quoted text -

To unsubscribe from this group, send email to 
nhibernate-development+unsubscribegooglegroups.com or reply to this email with 
the words "REMOVE ME" as the subject.

Reply via email to