Friday, March 23, 2012

How to make a diagram from data in a SQL Server table?

Hi all,

I′m a real SQL rookie and after two days of intensive research and reading of dozens of articles and web pages a bit confused about all that knowledge concerning database technology ... and I only want to do something very easy ...

Now, my question is, how can I produce a diagram from that data, that is stored in a table, maybe called "DiagData1"?

I have installed SQL Server Express 2005 and Visual Basic Express 2005 and did some first steps with it as where shown in an brilliant tutorial that I′ve found on a Microsoft (?) webpage. It shows the complete way building a database and connecting it to a form which was build with Visual Basic. So all what is left is find out how the database tables are connected to a diagram.

thanks′n greets,

VBFan

Hi all,

after long hours of reading and testing there′s some success now. Taking some lines from the online help I′ve done the following VB-prog that produces lines on the form when the button is pushed.

Now I would like to know how the button can be added by the prog at runtime. When I try it with the lines, that are commented out, I get an error.

Does anybody have the solution?

Thank you and greetings,

VBFan

Public Class Form1

Dim clI As Integer = 0

' Private Button1 As New Button()

'Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' Me.Controls.Add(Button1)

' Button1.Height = 100

' Button1.Text = "Draw Line"

'End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)

Dim formGraphics As System.Drawing.Graphics

formGraphics = Me.CreateGraphics()

formGraphics.DrawLine(myPen, 0, 0, 200, 200 + clI)

clI = clI + 10

myPen.Dispose()

formGraphics.Dispose()

End Sub

End Class

sql

No comments:

Post a Comment