rwensley
asked on
Read SQLite Field into a variable in VB.net
Greetings,
I need to read a field from a record in SQLite into a variable in VB.net.
Many examples exist for reading into a textbox, combobox, listbox, or datagrid. But I can not find an example of reading into a variable.
ie. A = column 1 of the table at row 1 (Column 1 is a BOOLEAN)
B = column 2 of the table at row 1 (Column 2 is a FLOAT)
I have thought of reading the values into an 'invisible' textbox then dealing with them, but this is very sloppy and not the way I want to proceed.
Thanks for the Help,
Ron
I need to read a field from a record in SQLite into a variable in VB.net.
Many examples exist for reading into a textbox, combobox, listbox, or datagrid. But I can not find an example of reading into a variable.
ie. A = column 1 of the table at row 1 (Column 1 is a BOOLEAN)
B = column 2 of the table at row 1 (Column 2 is a FLOAT)
I have thought of reading the values into an 'invisible' textbox then dealing with them, but this is very sloppy and not the way I want to proceed.
Thanks for the Help,
Ron
ASKER
NOTE: These text box is for displaying the value only. I want the variable -bool to be used elsewhere in the program.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
There are no errors when it runs, however the _bool is always False even when the field value is True
SQLcommand.CommandText = "SELECT fc_calibrated_meter FROM flowcalcs WHERE fc_tag='" & cmbFCTag.Text & "'"
Dim _bool As Boolean = CType(SQLcommand.ExecuteSc
TextBox1.Text = _bool
Any ideas are welcome
Ron