Click here to Skip to main content
15,921,941 members
Home / Discussions / C#
   

C#

 
AnswerRe: The DateTime Value Type Pin
User 665817-Jun-07 9:11
User 665817-Jun-07 9:11 
AnswerRe: The DateTime Value Type Pin
Luc Pattyn17-Jun-07 9:34
sitebuilderLuc Pattyn17-Jun-07 9:34 
GeneralRe: The DateTime Value Type Pin
PIEBALDconsult17-Jun-07 14:45
mvePIEBALDconsult17-Jun-07 14:45 
QuestionCreating list of method execution time Pin
AndrusM17-Jun-07 5:10
AndrusM17-Jun-07 5:10 
AnswerRe: Creating list of method execution time Pin
Guffa17-Jun-07 7:05
Guffa17-Jun-07 7:05 
GeneralRe: Creating list of method execution time Pin
AndrusM18-Jun-07 3:07
AndrusM18-Jun-07 3:07 
AnswerRe: Creating list of method execution time Pin
User 665817-Jun-07 7:34
User 665817-Jun-07 7:34 
QuestionHow can I search for a record without using Primary key Pin
Jon Stroh17-Jun-07 4:39
Jon Stroh17-Jun-07 4:39 
I would like to know how to search for a certain record by a value in a non keyed column, then being able to update that record to the values in another table. Here is what I have used in the past to locate a record by a primary key, is there a way to do the same with out a keyed column as a search value.Do I need to set the primary key temporarily to the new column I need to search?



DataSet1.HorseJoinTableDataTable dth = new DataSet1.HorseJoinTableDataTable();

DataSet1TableAdapters.HorseJoinTableTableAdapter tah = new FBWinMobileSync.DataSet1TableAdapters.HorseJoinTableTableAdapter();

dataSet1.EnforceConstraints = false;

tah.FillByMod(dth);

fB7MobileDBDataSet.EnforceConstraints = false;

foreach (DataSet1.HorseJoinTableRow dr in dth.Rows)

try

{ How can I accomplish this below on a non keyed column search

FB7MobileDBDataSet.HorseRow newMobileHorse = this.fB7MobileDBDataSet.Horse.FindByCODEHorseName(dr.CODE, dr.HORSENAME);

newMobileHorse.CODE = dr.CODE;

newMobileHorse.Stable = dr.STABLE;

newMobileHorse.HorseName = dr.HORSENAME;

newMobileHorse.Active = dr.ACTIVE;

newMobileHorse.AngleLF = dr.ANGLELF;

newMobileHorse.AngleLH = dr.ANGLELH;

newMobileHorse.AngleRF = dr.ANGLERF;

newMobileHorse.AngleRH = dr.ANGLERH;

dataSet1.EnforceConstraints = false;

//if(dr.DUEDATE.ToString().Trim()=="")

if (dr.IsNull("DUEDATE"))

dr.DUEDATE = DateTime.Today;

newMobileHorse.DueDate = dr.DUEDATE;

if (dr.IsNull("LASTCOST"))

dr.LASTCOST = "0";

double D = Convert.ToDouble(dr.LASTCOST);

newMobileHorse.LastCost = D; //Convert.ToDouble(dr.LASTCOST);

newMobileHorse.Totals = 3;

//Equals no change to record

if (dr.IsNull("LASTDATE"))

dr.LASTDATE = DateTime.Today;

newMobileHorse.LastDate = dr.LASTDATE;

newMobileHorse.LengthLF = dr.LENGTHLF;

newMobileHorse.LengthLH = dr.LENGTHLH;

newMobileHorse.LengthRF = dr.LENGTHRF;

newMobileHorse.LengthRH = dr.LENGTHRH;

newMobileHorse.MainWork = dr.MAINWORK;

newMobileHorse.NickName = dr.NICKNAME;

newMobileHorse.SizeLF = dr.SIZELF;

newMobileHorse.SizeLH = dr.SIZELH;

newMobileHorse.SizeRF = dr.SIZERF;

newMobileHorse.SizeRH = dr.SIZERH;

newMobileHorse.Weeks = Convert.ToInt16(dr.WEEKS);

newMobileHorse.Delete = dr.DELETE;

newMobileHorse.LengthList = dr.LENGTHLIST;

newMobileHorse.NeedsNewFr = dr.NEEDS_NEW_FR;

newMobileHorse.NeedsNewHd = dr.NEEDS_NEW_HD;

newMobileHorse.StartAngleLF = dr.START_ANGLE_LF;

newMobileHorse.StartAngleLH = dr.START_ANGLE_LH;

newMobileHorse.StartAngleRF = dr.START_ANGLE_RF;

newMobileHorse.StartAngleRH = dr.START_ANGLE_RH;

newMobileHorse.StartLengthLF = dr.START_LENGHT_LF;

newMobileHorse.StartLengthLH = dr.START_LENGTH_LH;

newMobileHorse.StartLengthRF = dr.START_LENGHT_RF;

newMobileHorse.StartLengthRH = dr.START_LENGTH_RH;

newMobileHorse.Front = dr.FRONT;

newMobileHorse.Hind = dr.HIND;





--------------------------------------------------------------------------------
Jon Stroh



Thanks Jon Stroh
AnswerRe: How can I search for a record without using Primary key Pin
WillemM17-Jun-07 8:15
WillemM17-Jun-07 8:15 
QuestionRe: How can I search for a record without using Primary key Pin
Jon Stroh18-Jun-07 2:35
Jon Stroh18-Jun-07 2:35 
QuestionCustom User Control and Repeater Pin
Expert Coming17-Jun-07 4:34
Expert Coming17-Jun-07 4:34 
AnswerRe: Custom User Control and Repeater Pin
Expert Coming17-Jun-07 16:58
Expert Coming17-Jun-07 16:58 
QuestionHiding a form in Vista Pin
Mr Jen Withers17-Jun-07 3:37
Mr Jen Withers17-Jun-07 3:37 
Questiondatagridview - VB.net 2005 ,sql server 2005 Pin
nilam1117-Jun-07 2:36
nilam1117-Jun-07 2:36 
AnswerRe: datagridview - VB.net 2005 ,sql server 2005 Pin
Arun.Immanuel17-Jun-07 2:45
Arun.Immanuel17-Jun-07 2:45 
AnswerRe: datagridview - VB.net 2005 ,sql server 2005 Pin
Sathesh Sakthivel17-Jun-07 3:47
Sathesh Sakthivel17-Jun-07 3:47 
Questiona small doubt .... Pin
Software_Specialist17-Jun-07 2:07
Software_Specialist17-Jun-07 2:07 
AnswerRe: Useless subject Pin
Guffa17-Jun-07 2:48
Guffa17-Jun-07 2:48 
GeneralRe: Useless subject Pin
Software_Specialist18-Jun-07 3:35
Software_Specialist18-Jun-07 3:35 
AnswerRe: Useless subject Pin
Guffa18-Jun-07 3:58
Guffa18-Jun-07 3:58 
QuestionLogging of Upload file Pin
reddyamar_uk17-Jun-07 1:41
reddyamar_uk17-Jun-07 1:41 
Questionrdlc Report Pin
imran_Shaikh16-Jun-07 23:41
imran_Shaikh16-Jun-07 23:41 
AnswerRe: rdlc Report Pin
WillemM17-Jun-07 4:32
WillemM17-Jun-07 4:32 
QuestionListbox Pin
MashALyy16-Jun-07 23:08
MashALyy16-Jun-07 23:08 
AnswerRe: Listbox Pin
PandemoniumPasha17-Jun-07 0:10
PandemoniumPasha17-Jun-07 0:10 

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.