Re: Saving PointF data in MSAccess
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
- From: Göran Andersson <guffa@xxxxxxxxx>
- Date: Sun, 18 Jun 2006 21:00:59 +0200
How about using a binarywriter to write the values to a memorystream,
get the byte array from the stream and use the Convert.ToBase64String
method to turn it into a string?
Keith G wrote:
VS2003 using VB.Net
I want to be able to save drawing path data in a database.
If I store the Points array for each GraphicsPath I can then reproduce (in
this case) filled polygons at run time. The user will create the polygons
initially.
The number of points in the polygons will vary so I only want to save this
data in one field (rectangles would have been a lot easier).
The only way I can think of doing this is by saving the points as a string
in a Memo field; looping through all the points in the Array and using
GetValue to add the points to the string e.g.:
{x=369, y=89}{x=500, y=200}{x=700, y=300}
To retrieve the polygon at the next run time then seems a bit messy i.e. to
extract the points from the string and get them in the PointF format e.g.:
PointArray(intZoneCount).SetValue(New PointF(369, 89), 0) (would be the
first point)
I can see how this can be done and I'm sure it will work but can anyone
suggest a better way? or am I missing something blindingly obvious!
Thanks in advance.
.
Relevant Pages
- Re: Saving PointF data in MSAccess
... I want to be able to save drawing path data in a database. ... this case) filled polygons at run time. ... The only way I can think of doing this is by saving the points as a string ... in a Memo field; looping through all the points in the Array and using ... (microsoft.public.dotnet.languages.vb) - Re: Saving PointF data in MSAccess
... I can see how the image data is converted into the Byte Array ... this case) filled polygons at run time. ... The only way I can think of doing this is by saving the points as a string ... in a Memo field; looping through all the points in the Array and using ... (microsoft.public.dotnet.languages.vb) - Re: Problem filtering recordset by values held in array
... If you have a string that starts out as 1, 2, 4, instead of splitting it ... into an array, keep it as is and use it in your WHERE clause. ... I can split the memo field OK, ... (microsoft.public.inetserver.asp.general) - Help in French|Spanish|German translation.
... I am also an author of User-defined string functions. ... WORDTRANEX (cSearched, cArExpressionSought | cExpressionSough, ... each string of the array is searched ... If the parameter nArStartOccurrence is -1 or omitted, the replacement starts ... (microsoft.public.fox.helpwanted) - Re: passing a string to a dll
... Joe, I really appreciate you taking the time to demonstrate this. ... sure how I would implement indexing it for random alphanumeric codes. ... I might handle the array. ... I actually have been wondering if I could use a second string ... (microsoft.public.vc.mfc) |
|