Knowledge Base
You are currently browsing the articles from Information City matching the category Knowledge Base.
This error prompted when I tried to preview the data of the query I added for the dataset. The query is designed to accept a parameter which would check for the value on one of the field. Theoretically, the query should works as it is but the error “failed to convert parameter value from a string to byte[]” shows. Trying to input the parameter by running the query builder prompted below:
“Invalid value for cell (row 1, column 2).
The changed value in this cell was not recognized as valid.
.Net Framework Data Type: Byte[]
Error Message: You cannot use the Result pane to set this Field data to values other than NULL.
Type a value appropriate for the data type or press ESC to cancel the change.”
This has kept me puzzled for sometime and searching around the internet to no avail. I resorted to re-create the dataset and add back the query which surprisingly resolves the problem!
It sounds weird but that’s how it have drain down my time!
Written by admin on July 7th, 2010 with no comments.
Read more articles on Knowledge Base and Programming.
While developing one of the apps. for demo on a touchscreen device, it came to surprise on the application windows sizing function. I have set the formborderstyle to fixedsingle in hope to disable the application from resize but it seems that it was able to shrink/un-maximize from maximized application. I tried playing around with the values in the window properties but to no avail.
I search around the net and found an interesting code snippet posted on Microsoft community newsgroup (idea originates from the MVP, Herfried K. Wagner):
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Const WM_NCLBUTTONDBLCLK As Int32 = &HA3
If m.Msg = WM_NCLBUTTONDBLCLK Then
Exit Sub
End If
MyBase.WndProc(m)
End Sub
Having that codes in the winforms disabled the window resizing on double clicking of the title bar. Great one!
Written by admin on May 12th, 2010 with no comments.
Read more articles on Knowledge Base and Programming.
Apparently this was one of the request from a client recently. Sadly, the report was a direct export from crystal report function and attempting to search for a way to force the report to be exported with the scaling of 1 page width and height failed. The current version that we are using is 10.5, which is also the version which comes with VS2008.
And another enhancement came in place was the crystal report to print a dynamic picture where the source location should be configurable (in app.config). There is an obvious limitation reported for version 10.5 and the feature was made available in the recent version of Crystal, we were to come up with a workaround to make it work. After much trial and errors, manage to do it by saving the image into a table of a database, and linking the table to the existing ones in crystal. This way the crystal would grab the image from the database instead of the physical location in the local directory. Not the best solution but could get the thing delivered.
Written by admin on March 27th, 2010 with no comments.
Read more articles on Knowledge Base and Programming.