Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. SQL Querry

SQL Querry

Scheduled Pinned Locked Moved C#
databasecsharpsql-serversysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cshivaprasad
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • C cshivaprasad

      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

      N Offline
      N Offline
      Naveed N Malik
      wrote on last edited by
      #2

      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"

      G 1 Reply Last reply
      0
      • N Naveed N Malik

        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"

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        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; }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups