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
Tam Nguyen
NA
17
15.3k
insert to oracle database using procedure
Dec 2 2010 1:17 AM
i have a problem for update table in winfom to oracle database 10g. insert using procedure in oracle. it do not update succesful. help me, please:((
when aplication was execute, do not insert. thanks you very much.
this is my code for insert funtion:
public void update(string studentCode, string Name,string sex, DateTime birthday, string address, string ClassID,string email)
{
try
{
String birthday1=birthday.ToShortDateString();
provider.command.Connection =provider.connection ;
provider.command.CommandType=System.Data.CommandType.StoredProcedure;
provider.command.CommandText="UPDATE_STUDENT";
//_provider.command.CommandType=System.Data.CommandType.StoredProcedure;
//MAHS
p= new OleDbParameter();
p.Direction=System.Data.ParameterDirection.Input ;
p.OleDbType=System.Data.OleDb.OleDbType.VarChar ;
p.Value=maHS;
provider.command.Parameters.Add(p);
//HOTEN
p= new OleDbParameter();
p.Direction=System.Data.ParameterDirection.Input ;
p.OleDbType=System.Data.OleDb.OleDbType.VarChar ;
p.Value=tenHS;
provider.command.Parameters.Add(p);
//PHAI
p= new OleDbParameter();
p.Direction=System.Data.ParameterDirection.Input ;
p.OleDbType=System.Data.OleDb.OleDbType.VarChar ;
p.Value=phai;
provider.command.Parameters.Add(p);
//ngaysinh
p= new OleDbParameter();
p.Direction=System.Data.ParameterDirection.Input ;
p.OleDbType=System.Data.OleDb.OleDbType.VarChar ;
p.Value=ngay_sinh;
provider.command.Parameters.Add(p);
//DIACHI
p= new OleDbParameter();
p.Direction=System.Data.ParameterDirection.Input ;
p.OleDbType=System.Data.OleDb.OleDbType.VarChar ;
p.Value=diachi;
provider.command.Parameters.Add(p);
//EMAIL
p= new OleDbParameter();
p.Direction=System.Data.ParameterDirection.Input ;
p.OleDbType=System.Data.OleDb.OleDbType.VarChar ;
p.Value=email;
provider.command.Parameters.Add(p);
provider.command.ExecuteNonQuery();
}
catch (Exception e)
{
throw new Exception(e.ToString());
}
}
Reply
Answers (
7
)
How to style the Tabs from TabControl?
How can i make datagridview row selected on closing or hiding child form which was opened on cell click