Click here to Skip to main content
15,914,396 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionReading from an excel spreadsheet and storing the informaton in a table??? Pin
Mr Oizo19-Mar-08 22:30
Mr Oizo19-Mar-08 22:30 
AnswerRe: Reading from an excel spreadsheet and storing the informaton in a table??? [modified] Pin
Madang19-Mar-08 23:18
Madang19-Mar-08 23:18 
GeneralRe: Reading from an excel spreadsheet and storing the informaton in a table??? Pin
Mr Oizo20-Mar-08 0:26
Mr Oizo20-Mar-08 0:26 
QuestionProgram Is Runing? Pin
Mogtabam19-Mar-08 19:15
Mogtabam19-Mar-08 19:15 
AnswerRe: Program Is Runing? Pin
Nilesh Hapse19-Mar-08 19:44
Nilesh Hapse19-Mar-08 19:44 
AnswerRe: Program Is Runing? Pin
Dave Kreskowiak20-Mar-08 5:08
mveDave Kreskowiak20-Mar-08 5:08 
AnswerRe: Program Is Runing? Pin
LloydA11122-Mar-08 8:23
LloydA11122-Mar-08 8:23 
Generalhalt macro Pin
Orlando234519-Mar-08 16:47
Orlando234519-Mar-08 16:47 
GeneralRe: halt macro Pin
Anoop Brijmohun19-Mar-08 20:22
Anoop Brijmohun19-Mar-08 20:22 
QuestionHow to load excel records into oracle table using vb.net Pin
Madang19-Mar-08 16:22
Madang19-Mar-08 16:22 
AnswerRe: How to load excel records into oracle table using vb.net Pin
Dave Kreskowiak20-Mar-08 5:10
mveDave Kreskowiak20-Mar-08 5:10 
GeneralSet the width for a dataGrid column Pin
AAGTHosting19-Mar-08 15:25
AAGTHosting19-Mar-08 15:25 
GeneralRe: Set the width for a dataGrid column Pin
Dave Kreskowiak20-Mar-08 5:03
mveDave Kreskowiak20-Mar-08 5:03 
GeneralCan't find column 1 in dataTable that populates dataview then datagrid Pin
AAGTHosting19-Mar-08 11:49
AAGTHosting19-Mar-08 11:49 
GeneralRe: Can't find column 1 in dataTable that populates dataview then datagrid Pin
Dave Kreskowiak19-Mar-08 13:10
mveDave Kreskowiak19-Mar-08 13:10 
GeneralRe: Can't find column 1 in dataTable that populates dataview then datagrid Pin
AAGTHosting19-Mar-08 15:05
AAGTHosting19-Mar-08 15:05 
GeneralRe: Can't find column 1 in dataTable that populates dataview then datagrid Pin
Dave Kreskowiak20-Mar-08 5:01
mveDave Kreskowiak20-Mar-08 5:01 
GeneralRandom records Pin
bapu288919-Mar-08 10:04
bapu288919-Mar-08 10:04 
GeneralRe: Random records Pin
Christian Graus19-Mar-08 10:42
protectorChristian Graus19-Mar-08 10:42 
QuestionRe: Random records Pin
bapu288919-Mar-08 11:07
bapu288919-Mar-08 11:07 
GeneralRe: Random records Pin
Christian Graus19-Mar-08 22:05
protectorChristian Graus19-Mar-08 22:05 
QuestionRe: Random records Pin
bapu288919-Mar-08 22:51
bapu288919-Mar-08 22:51 
Hello sir
good morning

this is want i have done last night but still it's getting same questions again and again

but i will try your next command today but i dont know that i am going in to right direction

 Private Sub Display()<br />
        ' Open the database.<br />
        Dim conn As OleDbConnection = GetDbConnection()<br />
<br />
        ' See how many records there are.<br />
        Dim query As String = "SELECT COUNT(*) FROM MyTest"<br />
        Dim cmd As New OleDbCommand(query, conn)<br />
        Dim num_records As Integer = cmd.ExecuteScalar()<br />
        If txtNum.Text > num_records Then<br />
            MsgBox("Hello there is only " & num_records & "  records in database" & vbCrLf & _<br />
            "So please enter " & num_records & " or less then " & num_records, MsgBoxStyle.Exclamation)<br />
            Exit Sub<br />
        End If<br />
        ' Make an array to hold the selected indexes.<br />
        Dim num_random As Integer = num_records<br />
        Dim Asked(num_random) As Boolean<br />
        Dim indexes(num_random - 1) As Integer<br />
        Dim sorted_indexes As New SortedList(num_random - 1)<br />
        ' Generate the indexes.<br />
        Dim rand As New Random<br />
        Dim I As Integer<br />
        For I = 0 To num_random - 1<br />
            ' Generate the i-th index.<br />
            Dim new_value As Integer = rand.Next(0, num_records - I)<br />
<br />
            ' For each previously generated index <=<br />
            ' than this one, increment this one.<br />
            For j As Integer = 0 To I - 1<br />
                If sorted_indexes.GetByIndex(j) <= new_value Then<br />
                    new_value += 1<br />
                End If<br />
            Next j<br />
<br />
            ' Save tjhe new value.<br />
            indexes(I) = new_value<br />
            sorted_indexes.Add(new_value, new_value)<br />
        Next I<br />
        query = "SELECT * FROM MyTest " & "WHERE Index=?"<br />
        cmd = New OleDbCommand(query, conn)<br />
        Dim i2 As Integer<br />
        ' Fetch record i.<br />
        Dim index As Integer = indexes(i2)<br />
        cmd.Parameters.Clear()<br />
        cmd.Parameters.Add(New OleDbParameter("Index", index))<br />
        Dim reader As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.SingleRow)<br />
        reader.Read()<br />
        lblA.Text = reader.Item(i2).ToString<br />
        ' Close the connection.<br />
        conn.Close()<br />
        conn.Dispose()<br />
    End Sub


thank you sir for your time Smile | :) Rose | [Rose]

have a nice day
Generalhiding mapped drive Pin
Cory Kimble19-Mar-08 9:41
Cory Kimble19-Mar-08 9:41 
GeneralRe: hiding mapped drive Pin
Dave Kreskowiak19-Mar-08 10:33
mveDave Kreskowiak19-Mar-08 10:33 
GeneralRe: hiding mapped drive Pin
Cory Kimble19-Mar-08 10:51
Cory Kimble19-Mar-08 10:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.