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
Mfwamba Tshimanga
NA
155
46k
doesnt save...
Oct 12 2014 3:18 PM
Hi!
Please could you see these codes. Its doesnt save on my database. I am not what happen.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace LunaOffice
{
public partial class RegistrarDemissao : Form
{
public Saveagent()
{
InitializeComponent();
}
OleDbConnection conn;
OleDbCommand comm;
string connstr = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\office\office\\app_data\office.mdb;Persist Security Info=False";
private void btnSaveCompany_Click(object sender, EventArgs e)
{
conn = new OleDbConnection(connstr);
comm = new OleDbCommand();
conn.Open();
OleDbParameter name = new OleDbParameter("@nam", SqlDbType.VarChar);
comm.Parameters.Add(name);
funcionario.Value = cbxName.Text;
comm.Connection = conn;
comm.CommandText = "insert into Full_Company values(@nam)";
try
{
comm.ExecuteNonQuery();
MessageBox.Show("Saved...");
}
catch (Exception)
{
MessageBox.Show("Not Saved...");
}
finally
{
conn.Close();
}
}
Reply
Answers (
8
)
Empty WebSite without code-behind
populate on my combobox...