Sorry am a beginer to Vb, therefore am looking for a simple way to fill combox with data from access database.
$sql = "select * from projects";
$select_records = mysqli_query($con,$sql);
while($fetch = mysqli_fetch_array($select_records)):
echo "<select name='project">";
echo "<option name='$fetch[projectname]'>$fetch[projectname]</option>";
Dim query as String Dim con as OleDbConnection Dim command as OleDbCommand Dim reader as OleDbDataReader con.Open() query = "select * from projects" command = New OleDbCommand(query, con) reader = command.ExecuteReader() If reader.HasRows Then While reader.Read() cb.Items.Add(reader("FieldName")) End While End If
cb there is the combobox name. Don't forget to import OleDb at the topmost of your code like this: