StrataFrame Forum

SqlException Using BrowseDialog

http://forum.strataframe.net/Topic648.aspx

By Robert Linton - 3/16/2006

Please see attached.

I can successfully load my BO manually, however, I'm getting an SqlException when I attempt to search for a range of records, by date, using a BrowseDialog.

Any clues?

TIA,

Rob

By Trent L. Taylor - 3/17/2006

Rob,

I am going to attempt to recreate this and I will get back with you.  Thanks.

By Trent L. Taylor - 3/17/2006

Rob,

I cannot reproduce this error.  It looks as though the value of the date is invalid when passed to the parser.  What database are you connecting to and what is the date field that you are using in your search criteria?  Also, one last thing, how did you setup the search fields?

By Robert Linton - 3/17/2006

MSSQL 2005

field name is date_added, type = datetime

To setup the search fields, I used the search fields dialog via the SearchFields propery on my BrowserDialog object. See attached.

By Trent L. Taylor - 3/17/2006

Is there anyway you could send me the database (structure) so I could reproduce the problem?  Just email me directly if you would like.  You can just create an script through SQL Server Management Studio if you would like which will make it very easy for me to create the exact structure on my server for reproducing the error.  Thanks Smile
By Trent L. Taylor - 3/22/2006

The issue ended up being the Maximum number of records returned was set to -1 and since SQL Server does not support a "TOP -1" an error was generated.  The BrowseDialog has been changed to prevent this from happening in the future.