Unhandle SQL Exception Thrown


Author
Message
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Well you may not like what I have to report.  The first SELECT TOP 10000... works just fine.  I assume when I click OK on the BrowseDialog the second SELECT statement is created and send to the backend.  The string is huge (> 4meg) setting up params such as NameNo=Parm1 OR ... NameNo=Parm9999 OR NameNo=ParmXXXX.

I attached the debug HTML document for your review.  Is this how the select statement should be formed???  I would have sent the same SELECT TOP 10000... again personally Smile (again not that I would do that in production! LOL)

Ben

Attachments
mydebug.zip (151 views, 156.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I am not sure what the error is, but you can turn on data debugging to look at the SELECT statement and even run it manually through SQL Server Management Studio to see if the same error occurs.  This is a SQLexpcetion so something happened on the SQL Server....which could be memory as well.

To turn on data debugging do the following:

In the AppMain.vb (or program.cs) file, go to the SetDataSourcesMethod.  After the SetConnections method, add the following code:

MicroFour.StrataFrame.Data.DataBasics.DataSources(0).SetDebugOn("C:\mydebug.html",True)

Run your program and after the app closes the HTML doc will pop up (if it doesn't you can manually open it).

Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
As I stated in the post "not that I would do this in production"... Attached is the details expanded.  I want to make sure to plug any holes in the framework (perhaps a more graceful message than this exception) to shield our developers (AND ultimately our end-users) from such exceptions.

Ben

Attachments
SF_ExceptionDetail.JPG (163 views, 73.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You would have to click the View detail and give me all of the exceptions to give you an exact answer.  But your problem is directly related to size.  More than likely a MemoryException.  You should really never bring back that many records for a table with more than a couple of fields.  I am not sure of your background, but you have to work in a disconnected environment and should only bring back small quantities of records. 

10,000 is too many and I would recommend reworking your logic so that you work in smaller data sets.  If you set the MaximumRecords to 1500 I would doubt that the error would occur.

Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Hopefully this is my last question of the day!  Sorry to be so active here today!

This is not something I would do in production but... In my POC application, I changed the BrowseDialog1.MaximumReturnedRecords to 10,000.  When I do a search with no criteria (bring back the first 10,000 entries), I receive the attached exception regardless which record I select for edit, upon return to the entry form.  If I change the MaximumReturnedRecords back to 1,000 (the default), all is well.

Can someone shed some light on this error?

Thanks!

Ben

Attachments
SF_sqlexception.JPG (162 views, 93.00 KB)
SF_PriorToException.JPG (170 views, 77.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search