mysql - How to dynamically change the name of column in the sqlstatement to be used for retrieving data using a combobox -


I want to change the name of my column dynamically all the time, whenever I select the same item name as the column Use the Cmbcategory combo box then use it to move your data into cmbparts comboBox. Is this possible?

This is my sample code:

  public sub cmbpartfill () sqlstatement = "select '" & amp; Cmbcategory.Text & amp; "Connect to Tblparts" (command) = New MySqlCommand (sqlstatement, connection) Reader = command.ExecuteReader while the reader. Read cmbpart.Items.Clear () cmbpart.Items.Add (reader.Item (0) .ToString) while finished disconnect () and sub   

I appreciate any help thank you .

This will work I think .............. sqlstatement = "Select" & amp; Cmbcategory.Text & amp; Edited by "Tblparts"

: Just try not to believe me ............

  sqlstatement = " ["& Amp; Cmbcategory.Text & amp; "] From Tblparts"    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -