我的問題顯示SQL結果由在顯示值插入DGV控制的細胞,例如:與條件DGV VB.NET
MySQL的表:
ID - Name - Price - Type
1 Mouse Pad 2.85$ - a
2 Keyboard 10.50$ - a
3 Hard Disk 80.00$ - c
4 Web Cam 15.02$ - b
5 Printer 45.62$ - c
6 DVD Writer 20.00$ - b
我DataGridView控件:
ID - Name - PriceA - PriceB - PriceC
欲顯示結果與這些條件[VB.NET sintax]濾波:
If SQLcolumn(Type) = a Then, show the price into PriceA into the DGV.
If SQLcolumn(Type) = b Then, show the price into PriceB into the DGV.
If SQLcolumn(Type) = c Then, show the price into PriceC into the DGV.
另一種解決方案 –