Click here to Skip to main content
15,891,248 members
Home / Discussions / C#
   

C#

 
GeneralRe: Crystal Report Pin
Ennis Ray Lynch, Jr.7-Feb-08 4:22
Ennis Ray Lynch, Jr.7-Feb-08 4:22 
GeneralSystem.BadImageFormatException thrown on uninstalling Pin
Waqas Badar6-Feb-08 23:16
Waqas Badar6-Feb-08 23:16 
QuestionRe: System.BadImageFormatException thrown on uninstalling Pin
Vikram A Punathambekar7-Feb-08 0:13
Vikram A Punathambekar7-Feb-08 0:13 
GeneralRe: System.BadImageFormatException thrown on uninstalling Pin
Waqas Badar7-Feb-08 1:49
Waqas Badar7-Feb-08 1:49 
GeneralProblem with ComboBox Selected.Item Pin
kallileo6-Feb-08 22:59
kallileo6-Feb-08 22:59 
GeneralRe: Problem with ComboBox Selected.Item Pin
AkmalSyed6-Feb-08 23:10
AkmalSyed6-Feb-08 23:10 
GeneralRe: Problem with ComboBox Selected.Item Pin
DaveyM696-Feb-08 23:41
professionalDaveyM696-Feb-08 23:41 
GeneralRe: Problem with ComboBox Selected.Item Pin
kallileo7-Feb-08 0:32
kallileo7-Feb-08 0:32 
Ok. I have tried some things and this what I get...

Using the below code and I have also display member, value member and SelectedValue of the comBox set to Name.

private void button3_Click(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Magazi.mdb");
conn.Open();
OleDbCommand cmd = new OleDbCommand("DELETE FROM Suppliers WHERE Name=@Name", conn);
OleDbParameter parDel = new OleDbParameter();
parDel.ParameterName = "@Name";
parDel.Value = comboBox1.SelectedValue.ToString();
cmd.Parameters.Add(parDel);
cmd.ExecuteNonQuery();
conn.Close();
}

When I try to select a value from comboBox I get this message:

Column 'Name' is constrained to be unique. Value 'Champion' is already present.
GeneralRe: Problem with ComboBox Selected.Item Pin
D i x y7-Feb-08 1:34
D i x y7-Feb-08 1:34 
GeneralRe: Problem with ComboBox Selected.Item Pin
Ravenet7-Feb-08 16:31
Ravenet7-Feb-08 16:31 
GeneralSend newsletter Pin
AkmalSyed6-Feb-08 22:59
AkmalSyed6-Feb-08 22:59 
GeneralRe: Send newsletter Pin
Gareth H6-Feb-08 23:15
Gareth H6-Feb-08 23:15 
GeneralRe: Send newsletter Pin
Jamman7-Feb-08 1:19
Jamman7-Feb-08 1:19 
GeneralRude Pin
pmarfleet7-Feb-08 2:30
pmarfleet7-Feb-08 2:30 
Generalimage display on window form Pin
RajeevKumarSharma6-Feb-08 22:53
RajeevKumarSharma6-Feb-08 22:53 
GeneralRe: image display on window form Pin
J a a n s6-Feb-08 23:02
professionalJ a a n s6-Feb-08 23:02 
GeneralRe: image display on window form Pin
RajeevKumarSharma6-Feb-08 23:13
RajeevKumarSharma6-Feb-08 23:13 
GeneralRe: image display on window form Pin
Vikram A Punathambekar7-Feb-08 0:16
Vikram A Punathambekar7-Feb-08 0:16 
GeneralRe: image display on window form Pin
Gareth H6-Feb-08 23:10
Gareth H6-Feb-08 23:10 
GeneralRe: image display on window form Pin
electriac7-Feb-08 4:25
electriac7-Feb-08 4:25 
GeneralCrystal_Report PRoblem Pin
simworld6-Feb-08 22:51
simworld6-Feb-08 22:51 
QuestionC# Office 2003 interop Drag & Drop Pin
dnaycxxx6-Feb-08 22:20
dnaycxxx6-Feb-08 22:20 
QuestionNDoc and C# 2.0 templates Pin
Chesnokov Yuriy6-Feb-08 21:45
professionalChesnokov Yuriy6-Feb-08 21:45 
GeneralRe: NDoc and C# 2.0 templates Pin
Pete O'Hanlon6-Feb-08 23:14
mvePete O'Hanlon6-Feb-08 23:14 
AnswerRe: NDoc and C# 2.0 templates Pin
Chesnokov Yuriy7-Feb-08 0:42
professionalChesnokov Yuriy7-Feb-08 0:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.