SQL Querry
-
Can anyone pls modify this querry to use inside in C# here "word" only the c# variable.I am using SQL Server as DB. SELECT Word,Category,Number,Gender,Person,Degree,ObjectType,Tense,Aspect,Mood,Comp1,Comp2,Comp3,Theta1,Theta2,Theta3 FROM HindiLex,Attributes,SubCategoryFrames,ThematicFrames where HindiLex.Word = word and HindiLex.AttrNo = Attributes.AttrNo And HindiLex.LexSCFNo = SubCategoryFrames.LexSCFNo and HindiLex.ThemSCFNo = ThematicFrames.ThemSCFNo -- modified at 2:07 Wednesday 3rd May, 2006
-
Can anyone pls modify this querry to use inside in C# here "word" only the c# variable.I am using SQL Server as DB. SELECT Word,Category,Number,Gender,Person,Degree,ObjectType,Tense,Aspect,Mood,Comp1,Comp2,Comp3,Theta1,Theta2,Theta3 FROM HindiLex,Attributes,SubCategoryFrames,ThematicFrames where HindiLex.Word = word and HindiLex.AttrNo = Attributes.AttrNo And HindiLex.LexSCFNo = SubCategoryFrames.LexSCFNo and HindiLex.ThemSCFNo = ThematicFrames.ThemSCFNo -- modified at 2:07 Wednesday 3rd May, 2006
hi man if this 'word' is string then it is like that "SELECT Word,Category,Number,Gender,Person,Degree,ObjectType,Tense,Aspect,Mood,Comp1,Comp2,Comp3,Theta1,Theta2,Theta3 FROM HindiLex,Attributes,SubCategoryFrames,ThematicFrames where HindiLex.Word = '" + word + "' and HindiLex.AttrNo = Attributes.AttrNo "+ "And HindiLex.LexSCFNo = SubCategoryFrames.LexSCFNo "+ "and HindiLex.ThemSCFNo = ThematicFrames.ThemSCFNo"
-
hi man if this 'word' is string then it is like that "SELECT Word,Category,Number,Gender,Person,Degree,ObjectType,Tense,Aspect,Mood,Comp1,Comp2,Comp3,Theta1,Theta2,Theta3 FROM HindiLex,Attributes,SubCategoryFrames,ThematicFrames where HindiLex.Word = '" + word + "' and HindiLex.AttrNo = Attributes.AttrNo "+ "And HindiLex.LexSCFNo = SubCategoryFrames.LexSCFNo "+ "and HindiLex.ThemSCFNo = ThematicFrames.ThemSCFNo"
Don't forget to encode the string correctly, or the query is open for SQL inections: "SELECT Word,Category,Number,Gender,Person,Degree,ObjectType,Tense,Aspect,Mood,Comp1,Comp2,Comp3,Theta1,Theta2,Theta3 FROM HindiLex,Attributes,SubCategoryFrames,ThematicFrames where HindiLex.Word = '" + word.Replace("'","''") + "' and HindiLex.AttrNo = Attributes.AttrNo "+ "And HindiLex.LexSCFNo = SubCategoryFrames.LexSCFNo "+ "and HindiLex.ThemSCFNo = ThematicFrames.ThemSCFNo" --- b { font-weight: normal; }