ben_harvey327 0 Newbie Poster

hey, im an allright programmer, but im stuck with something, which is probably very simple, i have a database, with all my movies, that is linked to a data set in vb 2008, that all works perfectly fine. above this i have a label and on form load it creates a random number, using

Public Function MakeNumRand() As String
        Dim NumRand As New Random
        Dim temp As String
        temp = NumRand.Next(1, 139)
        Return temp
    End Function

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label1.Text = MakeNumRand()
    End Sub

that also works, fine, but what i want this to do, is show the dvd, with the id number of whatever that random number comes, up as.
just a little infor about my database...
the table is called "Movies"
the id column is "ID"
the movie column is "Movies"

hope you can help, many thanks

ben

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.