combobox and sqlite

Discussion in 'Questions (Windows Mobile)' started by dennishea, Mar 22, 2008.

  1. dennishea

    dennishea Active Member Licensed User

    How do you load one col of sqlite into combobox. Any suggestions welcome.

    :sign0085:

    Thanks in advance.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Something like: (Reader is a DataReader object and cmb is a ComboBox)
    Code:
    cmd.CommandText = "SELECT col FROM table"
    Reader.Value = cmd.ExecuteReader
    Do While reader.ReadNextRow = True 
        cmb.Add(reader.GetValue(
    0))
    Loop
    Reader.Close
     
  3. dennishea

    dennishea Active Member Licensed User

    Thanks Erel.

    I was checking online and forgot about the help file in b4p. I've used commandtext and connection but not datareader yet. Thanks for reminding me about the 3rd object in sqldevice.dll.

    :sign0188::):sign0188:
     
Loading...