[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

How do I draw lines with data from ODBC.NET

Bengt-Erik Eliasson

1/3/2003 2:42:00 PM

I'd like to know how to use data from Sybase in a diagram. I've managed to
install ODBC.NET and bind data using booth Repeater and DataList.
How do I do THIS in .NET-style?:

Points = "{"
Do While Not RsValues.EOF
Points = Points & "New Point(" & RsValues("Date") & ", " &
RsValues("Measure") & "), "
RsValues.MoveNext
Loop
RsValues.Close
' Following line removes the two last character (dash and space) and concat
Points = Left(Points, (Len(Points)-2)) & "}"

The variable 'Points' will now look something like this "{New Point(10, 10),
New Point(10, 100), New Point(200, 50), New Point(250, 300)}"
Then I want to use the result in this sub:

Public Sub DrawLinesPoint(e As PaintEventArgs)
' Create pen.
Dim blackPen As New Pen(Color.Black, 3)
' Create array of points that define lines to draw.
'Dim points As Point() = {New Point(10, 10), New Point(10, 100), New
Point(200, 50), New Point(250, 300)}
'Now I want to draw lines to screen.
e.Graphics.DrawLines(blackPen, points)
End Sub

/ Bengt-Erik