Click here to Skip to main content
15,912,977 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Code Explanation Pin
Paul Conrad23-Jul-07 20:21
professionalPaul Conrad23-Jul-07 20:21 
GeneralRe: Code Explanation Pin
Psycho-*Coder*-Extreme23-Jul-07 20:23
Psycho-*Coder*-Extreme23-Jul-07 20:23 
GeneralRe: Code Explanation Pin
Paul Conrad23-Jul-07 20:29
professionalPaul Conrad23-Jul-07 20:29 
GeneralRe: Code Explanation Pin
Psycho-*Coder*-Extreme23-Jul-07 21:06
Psycho-*Coder*-Extreme23-Jul-07 21:06 
GeneralRe: Code Explanation Pin
Paul Conrad23-Jul-07 21:08
professionalPaul Conrad23-Jul-07 21:08 
GeneralRe: Code Explanation Pin
Psycho-*Coder*-Extreme23-Jul-07 22:01
Psycho-*Coder*-Extreme23-Jul-07 22:01 
GeneralRe: Code Explanation Pin
Paul Conrad24-Jul-07 5:08
professionalPaul Conrad24-Jul-07 5:08 
GeneralRe: Code Explanation Pin
ASPnoob23-Jul-07 18:19
ASPnoob23-Jul-07 18:19 
Hi, please help I've been wrestling with this for a very long time and its not working. The problem is it doesn't generate any errors, no exception was thrown. The following is my code.
<br />
<br />
    Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged<br />
<br />
        Dim myCon As OdbcConnection<br />
        Dim i As Integer<br />
        Dim cmd As OdbcCommand<br />
        For i = 0 To ListBox2.Items.Count - 1<br />
            If ListBox2.Items(i).Selected Then<br />
<br />
                myCon = New OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=myServer;Database=myDatabase;User=myUserassword=myPass;Option=3;")<br />
                cmd = New OdbcCommand("SELECT * FROM myTable where Professions = '" & ListBox2.Items(i).Text & "'")<br />
<br />
            End If<br />
        Next<br />
        If Not IsNothing(myCon) Then<br />
            myCon.Open()<br />
<br />
            cmd.Connection = myCon<br />
<br />
            Dim ds As New DataSet<br />
<br />
            Dim ad As New OdbcDataAdapter(cmd)<br />
<br />
            ad.Fill(ds)<br />
<br />
            Me.ListBox2.DataSource = ds<br />
<br />
            Me.ListBox2.DataTextField = "ResumesID"<br />
            Me.ListBox2.DataTextField = "Resumes"<br />
            Me.ListBox2.DataBind()<br />
<br />
        End If<br />
    End Sub<br />

GeneralRe: Code Explanation Pin
Paul Conrad23-Jul-07 18:22
professionalPaul Conrad23-Jul-07 18:22 
GeneralRe: Code Explanation [modified] Pin
ASPnoob23-Jul-07 18:35
ASPnoob23-Jul-07 18:35 
GeneralRe: Code Explanation Pin
Paul Conrad23-Jul-07 18:45
professionalPaul Conrad23-Jul-07 18:45 
GeneralRe: Code Explanation Pin
ASPnoob23-Jul-07 18:59
ASPnoob23-Jul-07 18:59 
GeneralRe: Code Explanation Pin
Paul Conrad23-Jul-07 19:07
professionalPaul Conrad23-Jul-07 19:07 
GeneralRe: Code Explanation Pin
Christian Graus23-Jul-07 19:13
protectorChristian Graus23-Jul-07 19:13 
GeneralRe: Code Explanation Pin
Paul Conrad23-Jul-07 19:40
professionalPaul Conrad23-Jul-07 19:40 
GeneralRe: Code Explanation Pin
Christian Graus23-Jul-07 19:51
protectorChristian Graus23-Jul-07 19:51 
QuestionCreate imagecombo in runtime Pin
haggenx23-Jul-07 12:32
haggenx23-Jul-07 12:32 
QuestionReturning to Main Form Pin
HelpMePlease!23-Jul-07 11:34
HelpMePlease!23-Jul-07 11:34 
AnswerRe: Returning to Main Form Pin
Luc Pattyn23-Jul-07 11:55
sitebuilderLuc Pattyn23-Jul-07 11:55 
AnswerRe: Returning to Main Form Pin
Ky Nam23-Jul-07 15:29
Ky Nam23-Jul-07 15:29 
Questioncomapring sorted list Pin
captainmogo23-Jul-07 10:13
captainmogo23-Jul-07 10:13 
AnswerRe: comapring sorted list Pin
Guffa23-Jul-07 12:16
Guffa23-Jul-07 12:16 
GeneralRe: comapring sorted list Pin
captainmogo25-Jul-07 3:53
captainmogo25-Jul-07 3:53 
AnswerRe: comapring sorted list Pin
Guffa25-Jul-07 4:07
Guffa25-Jul-07 4:07 
QuestionSingle Sign On (SSO) Pin
Ridge Howison23-Jul-07 9:41
Ridge Howison23-Jul-07 9:41 

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.