TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mohammed alherwi
NA
35
0
Binding picture box with column with oracle
Aug 14 2020 2:38 PM
con =
new
OleDbConnection(
"provider=oraoledb.oracle.1;user id=scott;password=tiger"
);
daEmp =
new
OleDbDataAdapter(
"select * from emp"
, con);
daDept =
new
OleDbDataAdapter(
"select * from dept"
, con);
//----------------------------
ds =
new
DataSet();
//---------------------------------------
daEmp.Fill(ds,
"emp"
);
dataGridView1.DataSource = ds.Tables[
"emp"
];
//-------------------------------------------
daDept.Fill(ds,
"dept"
);
cmbDname.DataSource = ds.Tables[
"dept"
];
cmbDname.DisplayMember =
"dname"
;
cmbDname.ValueMember =
"deptno"
;
//-------------------------------------------------
pictureBox1.DataBindings.Add(
"Image"
, ds.Tables[
"emp"
],
"photo2"
,
true
, DataSourceUpdateMode.OnPropertyChanged);
txtEmpno.DataBindings.Add(
"text"
, ds.Tables[
"emp"
],
"empno"
);
txtEname.DataBindings.Add(
"text"
, ds.Tables[
"emp"
],
"ename"
);
txtSal.DataBindings.Add(
"text"
, ds.Tables[
"emp"
],
"sal"
);
cmbDname.DataBindings.Add(
"selectedvalue"
, ds.Tables[
"emp"
],
"deptno"
);
dtpHireDate.DataBindings.Add(
"text"
, ds.Tables[
"emp"
],
"hiredate"
);
txtJob.DataBindings.Add(
"text"
, ds.Tables[
"emp"
],
"job"
);
OleDbCommandBuilder cmb =
new
OleDbCommandBuilder(daEmp);
bmb =
this
.BindingContext[ds.Tables[
"emp"
]];
}
Im using the above code to insert picture of employee but when i Try to save it using
bmb.EndCurrentEdit();
daEmp.Update(ds.Tables[
"emp"
]);
Im getting an error Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
I have tried to change the data type in Oracle from blob to long raw but Im getting the same issue.
Could u plz let me know what is the error
Reply
Answers (
3
)
String not working in main part
Printer setting programmatically when use Webbrowser control