Load Image from Oracle BLOB into WPF Image Control
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Load Image from Oracle BLOB into WPF Image Control相关的知识,希望对你有一定的参考价值。
I know most of you are lazy, so copy the XAML code below:
using System.Windows; using System.Data.OracleClient; using System.Data; namespace WpfLoadOracleBlob { ////// Interaction logic for Window1.xaml ///public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { OracleConnection conn = new OracleConnection( "Data Source=localhost;" + "Persist Security Info=True;" + "User ID=C07;Password=C07;Unicode=True"); conn.Open(); OracleDataAdapter ad = new OracleDataAdapter( "SELECT ROWNUM, GAMBAR_BIN FROM GAMBAR", conn); DataTable tb = new DataTable(); ad.Fill(tb); comboBox1.DataContext = tb; conn.Close(); } } }
the key is incomboBox1.DataContext = tb;It means that comboBox1 Bind the data from yourSELECTQuery.
4. Now test your project and see the result of your work.
Okay, that’s all I can tell you. If you have any questions just leave it to the comment.
以上是关于Load Image from Oracle BLOB into WPF Image Control的主要内容,如果未能解决你的问题,请参考以下文章
Import image from './image.jpeg' results Failed to load module script 服务器以“image/jpegerror”的非 JavaSc
启动hadoop报ERROR org.apache.hadoop.hdfs.server.namenode.FSImage: Failed to load image from FSImageFile
from scipy import special, optimize, from ._nnls import nnls ImportError: DLL load failed: 找不到指定的模块。
从已有container中生成新的image&打标签——Creating a Docker Image from an Existing Container