I've run into a problem while working on an interface for the result of raw SQL.
The user inputs the raw SQL code and the form renders a result, it's an educational piece of software so nothing too fancy.
Now, the problem I have is that after putting the result into a DataTable, it crashes when I pass it as a DataSource for the DataGridView.
The database I'm querying is an MSAccess (2003, mdb) database.
Oddly enough, it doesn't misbehave (crash) when I'm using an SQLite database.
I would like some help since the stacktrace isn't making sense to me.
A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll
System.Transactions Critical: 0 : <tracerecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" severity="Critical"><traceidentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled<description>Unhandled exception<appdomain>SimpelQL.Net.vshost.exe<exception><exceptiontype>System.ArgumentException, mscorlib, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089<message>Parameter is not valid.<stacktrace> at System.Drawing.Font.GetHeight(Graphics graphics)
at System.Windows.Forms.DataGridView.RefreshRows(Boolean scrollIntoView)
at System.Windows.Forms.DataGridView.OnDataSourceChanged(EventArgs e)
at System.Windows.Forms.DataGridView.set_DataSource(Object value)
at Proj.Net.MainForm.evt_Exec(Object sender, EventArgs e) in L:\Dev\Proj.Net\MainForm.cs:line 139
The first rule of CListCtrl is you do not talk about CListCtrl - kornman
I do not know what your level of expertise is, and a simple POS (point of sales) system at its most basic level might be okay. Just start thinking about the basic procedures and experiment around and learn. Just as a pointer, I will not give code out how to do this type of system, as it would not help you in your learning
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
I'd suggest starting with LZ77: http://en.wikipedia.org/wiki/LZ78[^]
- It is one of the earlier most widespread lossless algo.
- It has been the base for many other algo.
- The compress and decompress code can be done in less than 100 lines of code.
It might take a while, but get a copy of the code and study it until you understand what every single line is doing. Then try to modify it and understand how all the parameters are inter-related.
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
Last Visit: 31-Dec-99 18:00 Last Update: 22-Sep-21 19:05