Click here to Skip to main content
15,884,537 members
Home / Discussions / C#
   

C#

 
AnswerRe: Question about using an if in a string Pin
liveoffedge2-Sep-13 0:15
professionalliveoffedge2-Sep-13 0:15 
GeneralRe: Question about using an if in a string Pin
OriginalGriff2-Sep-13 3:49
mveOriginalGriff2-Sep-13 3:49 
GeneralRe: Question about using an if in a string Pin
Keith Barrow2-Sep-13 6:21
professionalKeith Barrow2-Sep-13 6:21 
GeneralRe: Question about using an if in a string Pin
skeeterz713-Sep-13 6:30
skeeterz713-Sep-13 6:30 
AnswerRe: Question about using an if in a string Pin
AmitGajjar2-Sep-13 20:02
professionalAmitGajjar2-Sep-13 20:02 
QuestionDistinct Row or Rows in a datatable Pin
smh139231-Aug-13 22:00
smh139231-Aug-13 22:00 
AnswerRe: Distinct Row or Rows in a datatable Pin
Mycroft Holmes31-Aug-13 22:42
professionalMycroft Holmes31-Aug-13 22:42 
GeneralRe: Distinct Row or Rows in a datatable Pin
smh13922-Sep-13 10:48
smh13922-Sep-13 10:48 
Thanks
Excuse me for bad to Read :
a simple instance is Here :
I want to Edit my Records , and Prevent the Duplicate Records e.g. :
----------------------------------
YearReg                 RegNo
  1950                    112
  1950                    102
  1951                    110
  1950                    114

-----------------------------------
For example in The All Records that Year is 1950 , RegNo shoulbe Unique and if Year=1951 , RegNo also unique and etc.
heres my code For EditButton Click :
...
string strQ = @"SELECT COUNT(RegNo) FROM tblRcvLet WHERE YearReg=@s1"
OleDbDataAdapter oda_Edited = new OleDbDataAdapter(strQ, ocn);
oda_Edited.SelectCommand.Parameters.Clear();
oda_Edited.SelectCommand.Parameters.AddWithValue("  @s1", txtYearReg.Text);
DataTable dt_Edited = new DataTable();
dt_Edited.Clear();
oda_Edited.Fill(dt_Edited);
if (dt_Edited.Rows.Count > 0)
   {
      MessageBox.Show("Already Exists!! ");
      txtRegNo.Focus();
    }
   else
   {
   OleDbCommand ocmd_Edited02 = new OleDbCommand();
    ocmd_Edited02.CommandText = @"UPDATE ....

But I can Not Edit(Update) Records ...
Thanks a Lot
AnswerRe: Distinct Row or Rows in a datatable Pin
susanna.floora1-Sep-13 19:09
susanna.floora1-Sep-13 19:09 
GeneralRe: Distinct Row or Rows in a datatable Pin
Mycroft Holmes1-Sep-13 19:52
professionalMycroft Holmes1-Sep-13 19:52 
QuestionPut DLL file to another location Pin
Midnight Ahri31-Aug-13 14:43
Midnight Ahri31-Aug-13 14:43 
AnswerRe: Put DLL file to another location Pin
Dave Kreskowiak31-Aug-13 15:10
mveDave Kreskowiak31-Aug-13 15:10 
AnswerRe: Put DLL file to another location Pin
Abhinav S31-Aug-13 15:51
Abhinav S31-Aug-13 15:51 
QuestionHow to get user names accessing ACCESS database Pin
BajrangSingh31-Aug-13 8:22
BajrangSingh31-Aug-13 8:22 
AnswerRe: How to get user names accessing ACCESS database Pin
Dave Kreskowiak31-Aug-13 8:29
mveDave Kreskowiak31-Aug-13 8:29 
GeneralRe: How to get user names accessing ACCESS database Pin
BajrangSingh31-Aug-13 9:32
BajrangSingh31-Aug-13 9:32 
GeneralRe: How to get user names accessing ACCESS database Pin
Dave Kreskowiak31-Aug-13 10:30
mveDave Kreskowiak31-Aug-13 10:30 
GeneralRe: How to get user names accessing ACCESS database Pin
BajrangSingh31-Aug-13 18:40
BajrangSingh31-Aug-13 18:40 
GeneralRe: How to get user names accessing ACCESS database Pin
Dave Kreskowiak1-Sep-13 5:02
mveDave Kreskowiak1-Sep-13 5:02 
AnswerRe: How to get user names accessing ACCESS database Pin
Mycroft Holmes31-Aug-13 13:09
professionalMycroft Holmes31-Aug-13 13:09 
GeneralRe: How to get user names accessing ACCESS database Pin
jschell31-Aug-13 13:57
jschell31-Aug-13 13:57 
GeneralRe: How to get user names accessing ACCESS database Pin
Mycroft Holmes31-Aug-13 16:17
professionalMycroft Holmes31-Aug-13 16:17 
GeneralRe: How to get user names accessing ACCESS database Pin
BajrangSingh31-Aug-13 19:27
BajrangSingh31-Aug-13 19:27 
AnswerRe: How to get user names accessing ACCESS database Pin
Chris Quinn2-Sep-13 4:14
Chris Quinn2-Sep-13 4:14 
QuestionAudio programming - play section of WAV file Pin
keykeeper130-Aug-13 23:04
keykeeper130-Aug-13 23:04 

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.