Connecting Tech Pros Worldwide Help | Site Map

How to separate sql codes using proper format??

nurikoAnna's Avatar
Newbie
 
Join Date: Nov 2008
Posts: 26
#1: Nov 12 '08
how to properly separate sql codes........

I am using &_ as a separator...because it will not suits the visual basic code form...it will skip to the next line that's why I am having trouble in it


Below is my code...please help me separate this using the proper separator and proper format
Expand|Select|Wrap|Line Numbers
  1. if CESDBConn.execute ("SELECT `t_application`.`PersonalInfoID`,`t_application`.` DateOfApplication`,`t_application`.`SchoolLastAtte nded`,`t_application`.`SLAAddress`,`t_application` .`GeneralAverage`,`t_application`.`CourseID`,`t_ap plication`.`SchoolYearID`,`t_personalinfo`.`FName` ,`t_personalinfo`.`MI`,`t_personalinfo`.`LName`,`t _personalinfo`.`BirthDate`,`t_personalinfo`.`Place OfBirth`,`t_personalinfo`.`Age`,`t_personalinfo`.` Gender`,`t_personalinfo`.`HomeAddress`,`t_personal info`.`ContactPerson`,`t_personalinfo`.`ContactPer sonPhone`,`t_personalinfo`.`Father`,`t_personalinf o`.`Mother`,`t_personalinfo`.`HSDateGraduated`FROM `t_application`
  2.  
  3. INNER JOIN `t_personalinfo` ON (`t_personalinfo`.`PersonalInfoID` = `t_application`.`PersonalInfoID`)
  4.  
  5. WHERE (`t_application`.`PersonalInfoID` LIKE '" & .PersonalInfoID & "') 
  6.  
  7. AND (`DateOfApplication` LIKE '" & .DateOfApplication & "') 
  8.  
  9. AND (`SchoolLastAttended` LIKE '" & .SchoolLastAttended & "') 
  10.  
  11. AND (`SLAAddress` LIKE '" & .SLAAddress & "') 
  12.  
  13. AND (`GeneralAverage` LIKE '" & .GeneralAverage & "') 
  14.  
  15. AND (`CourseID` LIKE '" & .CourseID & "') 
  16.  
  17. AND (`SchoolYearID` LIKE '" & .SchoolYearID & "') 
  18.  
  19. AND (`FName` LIKE '" & .FName & "') 
  20.  
  21. AND (`MI` LIKE '" & .MI & "') 
  22.  
  23. AND (`LName` LIKE '" & .LName & "') 
  24.  
  25. AND (`BirthDate` LIKE '" & .BirthDate & "') 
  26.  
  27. AND (`PlaceOfBirth` LIKE '" & .PlaceOfBirth & "') 
  28.  
  29. AND (`Age` LIKE '" & .Age & "') 
  30.  
  31. AND (`Gender` LIKE '" & .Gender & "') 
  32.  
  33. AND (`HomeAddress` LIKE '" & .HomeAddress & "') 
  34.  
  35. AND (`ContactPerson` LIKE '" & .ContactPerson & "') 
  36.  
  37. AND (`ContactPersonPhone` LIKE '" & .ContactPersonPhone & "') 
  38.  
  39. AND (`Father` LIKE '" & .Father & "') 
  40.  
  41. AND (`Mother` LIKE '" & .Mother & "') 
  42.  
  43. AND (`HSDateGraduated` LIKE '" & .HSDateGraduated & "')").EOF then
  44.  
Please...God bless
Dököll's Avatar
Moderator
 
Join Date: Nov 2006
Location: Upstate NY - US
Posts: 2,267
#2: Jan 1 '09

re: How to separate sql codes using proper format??


First, I added code tags for ya, then I went ahead and brought down the necessary ANDs to make it more readable.

Is this what you were after? Do stay tuned for other ideas if not:-)

Happy New Year!
Reply


Similar Visual Basic 4 / 5 / 6 bytes