Mmmm! The smell of happy users, and happy maintenence coders...
-
Here is an example from QA - it's from a beginner (Oh Gawd, I hope he's a beginner and this isn't in production code)
cmd.CommandText = " UPDATE ALLUGTAMIL SET name='" & TextBox2.Text & "',dob='" & TextBox3.Text & "',depart='" & TextBox4.Text & "',p1='" & TextBox5.Text & "',p2='" & TextBox6.Text & "',p3='" & TextBox7.Text & "',p4='" & TextBox8.Text & "',p5='" & TextBox9.Text & "',p6='" & TextBox10.Text & "',p7='" & TextBox11.Text & "',p8='" & TextBox12.Text & "',p9='" & TextBox13.Text & "',p10='" & TextBox14.Text & "',p11='" & TextBox15.Text & "',p12='" & TextBox16.Text & "',p13='" & TextBox17.Text & "',p14='" & TextBox18.Text & "',p15='" & TextBox19.Text & "',p16='" & TextBox20.Text & "',p17='" & TextBox21.Text & "',im1='" & TextBox22.Text & "',ex1='" & TextBox23.Text & "',tot1='" & TextBox24.Text & "',res1='" & TextBox25.Text & "',im2='" & TextBox26.Text & "',em2='" & TextBox27.Text & "',tot2='" & TextBox28.Text & "',res2='" & TextBox29.Text & "',im3='" & TextBox30.Text & "',em3='" & TextBox31.Text & "',tot3='" & TextBox32.Text & "',res3='" & TextBox33.Text & "',im4='" & TextBox34.Text & "',em4='" & TextBox35.Text & "',tot4='" & TextBox36.Text & "',res4='" & TextBox37.Text & "',im5='" & TextBox38.Text & "',em5='" & TextBox39.Text & "',tot5='" & TextBox40.Text & "',res5='" & TextBox41.Text & "',im6='" & TextBox42.Text & "',em6='" & TextBox43.Text & "',tot6='" & TextBox44.Text & "',res6='" & TextBox45.Text & "',im7='" & TextBox46.Text & "',em7='" & TextBox47.Text & "',tot7='" & TextBox48.Text & "',res7='" & TextBox49.Text & "',im8='" & TextBox50.Text & "',em8='" & TextBox51.Text & "',tot8='" & TextBox52.Text & "',res8='" & TextBox53.Text & "',im9='" & TextBox54.Text & "',em9='" & TextBox55.Text & "',tot9='" & TextBox56.Text & "',res9='" & TextBox57.Text & "',im10='" & TextBox58.Text & "',em10='" & TextBox59.Text & "',tot10='" & TextBox60.Text & "',res10='" & TextBox61.Text & "',im11='" & TextBox62.Text & "',em11='" & TextBox63.Text & "',tot11='" & TextBox64.Text & "',res11='" & TextBox65.Text & "'
At least did he try to keep this thing readable: Note the extra spaces before UPDATE ind in the WHERE clause.
-
At least did he try to keep this thing readable: Note the extra spaces before UPDATE ind in the WHERE clause.
Bernhard Hiller wrote:
At least did he Visual Studio try to keep this thing readable: Note the extra spaces before UPDATE ind in the WHERE clause.
FTFY!
The quick red ProgramFOX jumps right over the
Lazy<Dog>
. My latest article: Understand how bitwise operators work (C# and VB.NET examples) My group: C# Programmers Group -
Here is an example from QA - it's from a beginner (Oh Gawd, I hope he's a beginner and this isn't in production code)
cmd.CommandText = " UPDATE ALLUGTAMIL SET name='" & TextBox2.Text & "',dob='" & TextBox3.Text & "',depart='" & TextBox4.Text & "',p1='" & TextBox5.Text & "',p2='" & TextBox6.Text & "',p3='" & TextBox7.Text & "',p4='" & TextBox8.Text & "',p5='" & TextBox9.Text & "',p6='" & TextBox10.Text & "',p7='" & TextBox11.Text & "',p8='" & TextBox12.Text & "',p9='" & TextBox13.Text & "',p10='" & TextBox14.Text & "',p11='" & TextBox15.Text & "',p12='" & TextBox16.Text & "',p13='" & TextBox17.Text & "',p14='" & TextBox18.Text & "',p15='" & TextBox19.Text & "',p16='" & TextBox20.Text & "',p17='" & TextBox21.Text & "',im1='" & TextBox22.Text & "',ex1='" & TextBox23.Text & "',tot1='" & TextBox24.Text & "',res1='" & TextBox25.Text & "',im2='" & TextBox26.Text & "',em2='" & TextBox27.Text & "',tot2='" & TextBox28.Text & "',res2='" & TextBox29.Text & "',im3='" & TextBox30.Text & "',em3='" & TextBox31.Text & "',tot3='" & TextBox32.Text & "',res3='" & TextBox33.Text & "',im4='" & TextBox34.Text & "',em4='" & TextBox35.Text & "',tot4='" & TextBox36.Text & "',res4='" & TextBox37.Text & "',im5='" & TextBox38.Text & "',em5='" & TextBox39.Text & "',tot5='" & TextBox40.Text & "',res5='" & TextBox41.Text & "',im6='" & TextBox42.Text & "',em6='" & TextBox43.Text & "',tot6='" & TextBox44.Text & "',res6='" & TextBox45.Text & "',im7='" & TextBox46.Text & "',em7='" & TextBox47.Text & "',tot7='" & TextBox48.Text & "',res7='" & TextBox49.Text & "',im8='" & TextBox50.Text & "',em8='" & TextBox51.Text & "',tot8='" & TextBox52.Text & "',res8='" & TextBox53.Text & "',im9='" & TextBox54.Text & "',em9='" & TextBox55.Text & "',tot9='" & TextBox56.Text & "',res9='" & TextBox57.Text & "',im10='" & TextBox58.Text & "',em10='" & TextBox59.Text & "',tot10='" & TextBox60.Text & "',res10='" & TextBox61.Text & "',im11='" & TextBox62.Text & "',em11='" & TextBox63.Text & "',tot11='" & TextBox64.Text & "',res11='" & TextBox65.Text & "'
Ah, I think I see the problem - it's VB! ;P
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Ah, I think I see the problem - it's VB! ;P
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I think this time VB has nothing to do with it!
Reality is an illusion caused by a lack of alcohol "Nagy, you have won the internets." - Keith Barrow
-
Here is an example from QA - it's from a beginner (Oh Gawd, I hope he's a beginner and this isn't in production code)
cmd.CommandText = " UPDATE ALLUGTAMIL SET name='" & TextBox2.Text & "',dob='" & TextBox3.Text & "',depart='" & TextBox4.Text & "',p1='" & TextBox5.Text & "',p2='" & TextBox6.Text & "',p3='" & TextBox7.Text & "',p4='" & TextBox8.Text & "',p5='" & TextBox9.Text & "',p6='" & TextBox10.Text & "',p7='" & TextBox11.Text & "',p8='" & TextBox12.Text & "',p9='" & TextBox13.Text & "',p10='" & TextBox14.Text & "',p11='" & TextBox15.Text & "',p12='" & TextBox16.Text & "',p13='" & TextBox17.Text & "',p14='" & TextBox18.Text & "',p15='" & TextBox19.Text & "',p16='" & TextBox20.Text & "',p17='" & TextBox21.Text & "',im1='" & TextBox22.Text & "',ex1='" & TextBox23.Text & "',tot1='" & TextBox24.Text & "',res1='" & TextBox25.Text & "',im2='" & TextBox26.Text & "',em2='" & TextBox27.Text & "',tot2='" & TextBox28.Text & "',res2='" & TextBox29.Text & "',im3='" & TextBox30.Text & "',em3='" & TextBox31.Text & "',tot3='" & TextBox32.Text & "',res3='" & TextBox33.Text & "',im4='" & TextBox34.Text & "',em4='" & TextBox35.Text & "',tot4='" & TextBox36.Text & "',res4='" & TextBox37.Text & "',im5='" & TextBox38.Text & "',em5='" & TextBox39.Text & "',tot5='" & TextBox40.Text & "',res5='" & TextBox41.Text & "',im6='" & TextBox42.Text & "',em6='" & TextBox43.Text & "',tot6='" & TextBox44.Text & "',res6='" & TextBox45.Text & "',im7='" & TextBox46.Text & "',em7='" & TextBox47.Text & "',tot7='" & TextBox48.Text & "',res7='" & TextBox49.Text & "',im8='" & TextBox50.Text & "',em8='" & TextBox51.Text & "',tot8='" & TextBox52.Text & "',res8='" & TextBox53.Text & "',im9='" & TextBox54.Text & "',em9='" & TextBox55.Text & "',tot9='" & TextBox56.Text & "',res9='" & TextBox57.Text & "',im10='" & TextBox58.Text & "',em10='" & TextBox59.Text & "',tot10='" & TextBox60.Text & "',res10='" & TextBox61.Text & "',im11='" & TextBox62.Text & "',em11='" & TextBox63.Text & "',tot11='" & TextBox64.Text & "',res11='" & TextBox65.Text & "'
OriginalGriff wrote:
UPDATE ALLUGTAMIL
You failed to see the actual problem: the textboxes contain text in TAMIL characters, but in the database varchar fields were used instead of nvarchar... :)
-
OriginalGriff wrote:
UPDATE ALLUGTAMIL
You failed to see the actual problem: the textboxes contain text in TAMIL characters, but in the database varchar fields were used instead of nvarchar... :)
:doh: Note to self: remove tin-foil hat before answering questions...
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.
-
Here is an example from QA - it's from a beginner (Oh Gawd, I hope he's a beginner and this isn't in production code)
cmd.CommandText = " UPDATE ALLUGTAMIL SET name='" & TextBox2.Text & "',dob='" & TextBox3.Text & "',depart='" & TextBox4.Text & "',p1='" & TextBox5.Text & "',p2='" & TextBox6.Text & "',p3='" & TextBox7.Text & "',p4='" & TextBox8.Text & "',p5='" & TextBox9.Text & "',p6='" & TextBox10.Text & "',p7='" & TextBox11.Text & "',p8='" & TextBox12.Text & "',p9='" & TextBox13.Text & "',p10='" & TextBox14.Text & "',p11='" & TextBox15.Text & "',p12='" & TextBox16.Text & "',p13='" & TextBox17.Text & "',p14='" & TextBox18.Text & "',p15='" & TextBox19.Text & "',p16='" & TextBox20.Text & "',p17='" & TextBox21.Text & "',im1='" & TextBox22.Text & "',ex1='" & TextBox23.Text & "',tot1='" & TextBox24.Text & "',res1='" & TextBox25.Text & "',im2='" & TextBox26.Text & "',em2='" & TextBox27.Text & "',tot2='" & TextBox28.Text & "',res2='" & TextBox29.Text & "',im3='" & TextBox30.Text & "',em3='" & TextBox31.Text & "',tot3='" & TextBox32.Text & "',res3='" & TextBox33.Text & "',im4='" & TextBox34.Text & "',em4='" & TextBox35.Text & "',tot4='" & TextBox36.Text & "',res4='" & TextBox37.Text & "',im5='" & TextBox38.Text & "',em5='" & TextBox39.Text & "',tot5='" & TextBox40.Text & "',res5='" & TextBox41.Text & "',im6='" & TextBox42.Text & "',em6='" & TextBox43.Text & "',tot6='" & TextBox44.Text & "',res6='" & TextBox45.Text & "',im7='" & TextBox46.Text & "',em7='" & TextBox47.Text & "',tot7='" & TextBox48.Text & "',res7='" & TextBox49.Text & "',im8='" & TextBox50.Text & "',em8='" & TextBox51.Text & "',tot8='" & TextBox52.Text & "',res8='" & TextBox53.Text & "',im9='" & TextBox54.Text & "',em9='" & TextBox55.Text & "',tot9='" & TextBox56.Text & "',res9='" & TextBox57.Text & "',im10='" & TextBox58.Text & "',em10='" & TextBox59.Text & "',tot10='" & TextBox60.Text & "',res10='" & TextBox61.Text & "',im11='" & TextBox62.Text & "',em11='" & TextBox63.Text & "',tot11='" & TextBox64.Text & "',res11='" & TextBox65.Text & "'
OriginalGriff wrote:
I hope he's a beginner
OriginalGriff wrote:
no breaks
Yes, well everyone knows that only senior devs are allowed to use the line continuation character. If we let all VB devs use it then the hierarchy would break down. <ExcuseMe>I just wanted to underscore that.</ExcuseMe>
-
OriginalGriff wrote:
I hope he's a beginner
OriginalGriff wrote:
no breaks
Yes, well everyone knows that only senior devs are allowed to use the line continuation character. If we let all VB devs use it then the hierarchy would break down. <ExcuseMe>I just wanted to underscore that.</ExcuseMe>
Whoo hoo! That means I'm a Senior Developer! Does that mean I get a pay rise?
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.
-
Whoo hoo! That means I'm a Senior Developer! Does that mean I get a pay rise?
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.
OriginalGriff wrote:
Does that mean I get a pay rise?
You already did.
-
Here is an example from QA - it's from a beginner (Oh Gawd, I hope he's a beginner and this isn't in production code)
cmd.CommandText = " UPDATE ALLUGTAMIL SET name='" & TextBox2.Text & "',dob='" & TextBox3.Text & "',depart='" & TextBox4.Text & "',p1='" & TextBox5.Text & "',p2='" & TextBox6.Text & "',p3='" & TextBox7.Text & "',p4='" & TextBox8.Text & "',p5='" & TextBox9.Text & "',p6='" & TextBox10.Text & "',p7='" & TextBox11.Text & "',p8='" & TextBox12.Text & "',p9='" & TextBox13.Text & "',p10='" & TextBox14.Text & "',p11='" & TextBox15.Text & "',p12='" & TextBox16.Text & "',p13='" & TextBox17.Text & "',p14='" & TextBox18.Text & "',p15='" & TextBox19.Text & "',p16='" & TextBox20.Text & "',p17='" & TextBox21.Text & "',im1='" & TextBox22.Text & "',ex1='" & TextBox23.Text & "',tot1='" & TextBox24.Text & "',res1='" & TextBox25.Text & "',im2='" & TextBox26.Text & "',em2='" & TextBox27.Text & "',tot2='" & TextBox28.Text & "',res2='" & TextBox29.Text & "',im3='" & TextBox30.Text & "',em3='" & TextBox31.Text & "',tot3='" & TextBox32.Text & "',res3='" & TextBox33.Text & "',im4='" & TextBox34.Text & "',em4='" & TextBox35.Text & "',tot4='" & TextBox36.Text & "',res4='" & TextBox37.Text & "',im5='" & TextBox38.Text & "',em5='" & TextBox39.Text & "',tot5='" & TextBox40.Text & "',res5='" & TextBox41.Text & "',im6='" & TextBox42.Text & "',em6='" & TextBox43.Text & "',tot6='" & TextBox44.Text & "',res6='" & TextBox45.Text & "',im7='" & TextBox46.Text & "',em7='" & TextBox47.Text & "',tot7='" & TextBox48.Text & "',res7='" & TextBox49.Text & "',im8='" & TextBox50.Text & "',em8='" & TextBox51.Text & "',tot8='" & TextBox52.Text & "',res8='" & TextBox53.Text & "',im9='" & TextBox54.Text & "',em9='" & TextBox55.Text & "',tot9='" & TextBox56.Text & "',res9='" & TextBox57.Text & "',im10='" & TextBox58.Text & "',em10='" & TextBox59.Text & "',tot10='" & TextBox60.Text & "',res10='" & TextBox61.Text & "',im11='" & TextBox62.Text & "',em11='" & TextBox63.Text & "',tot11='" & TextBox64.Text & "',res11='" & TextBox65.Text & "'
The only thing I see wrong with that UPDATE statement is the naming convention of the textboxes.
-
Here is an example from QA - it's from a beginner (Oh Gawd, I hope he's a beginner and this isn't in production code)
cmd.CommandText = " UPDATE ALLUGTAMIL SET name='" & TextBox2.Text & "',dob='" & TextBox3.Text & "',depart='" & TextBox4.Text & "',p1='" & TextBox5.Text & "',p2='" & TextBox6.Text & "',p3='" & TextBox7.Text & "',p4='" & TextBox8.Text & "',p5='" & TextBox9.Text & "',p6='" & TextBox10.Text & "',p7='" & TextBox11.Text & "',p8='" & TextBox12.Text & "',p9='" & TextBox13.Text & "',p10='" & TextBox14.Text & "',p11='" & TextBox15.Text & "',p12='" & TextBox16.Text & "',p13='" & TextBox17.Text & "',p14='" & TextBox18.Text & "',p15='" & TextBox19.Text & "',p16='" & TextBox20.Text & "',p17='" & TextBox21.Text & "',im1='" & TextBox22.Text & "',ex1='" & TextBox23.Text & "',tot1='" & TextBox24.Text & "',res1='" & TextBox25.Text & "',im2='" & TextBox26.Text & "',em2='" & TextBox27.Text & "',tot2='" & TextBox28.Text & "',res2='" & TextBox29.Text & "',im3='" & TextBox30.Text & "',em3='" & TextBox31.Text & "',tot3='" & TextBox32.Text & "',res3='" & TextBox33.Text & "',im4='" & TextBox34.Text & "',em4='" & TextBox35.Text & "',tot4='" & TextBox36.Text & "',res4='" & TextBox37.Text & "',im5='" & TextBox38.Text & "',em5='" & TextBox39.Text & "',tot5='" & TextBox40.Text & "',res5='" & TextBox41.Text & "',im6='" & TextBox42.Text & "',em6='" & TextBox43.Text & "',tot6='" & TextBox44.Text & "',res6='" & TextBox45.Text & "',im7='" & TextBox46.Text & "',em7='" & TextBox47.Text & "',tot7='" & TextBox48.Text & "',res7='" & TextBox49.Text & "',im8='" & TextBox50.Text & "',em8='" & TextBox51.Text & "',tot8='" & TextBox52.Text & "',res8='" & TextBox53.Text & "',im9='" & TextBox54.Text & "',em9='" & TextBox55.Text & "',tot9='" & TextBox56.Text & "',res9='" & TextBox57.Text & "',im10='" & TextBox58.Text & "',em10='" & TextBox59.Text & "',tot10='" & TextBox60.Text & "',res10='" & TextBox61.Text & "',im11='" & TextBox62.Text & "',em11='" & TextBox63.Text & "',tot11='" & TextBox64.Text & "',res11='" & TextBox65.Text & "'
Ok I wanna know just exactly how you broken into our TFS and downloaded the code from one of our files!? :)
-
The only thing I see wrong with that UPDATE statement is the naming convention of the textboxes.
Read it again. ahah