KEMBAR78
Web Technology | PDF
0% found this document useful (0 votes)
385 views51 pages

Web Technology

web technology file

Uploaded by

Live Shinchan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
385 views51 pages

Web Technology

web technology file

Uploaded by

Live Shinchan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 51
Department of Information Technology United College of Engineering & Research, Prayagraj Dr. A.P.J. Abdul Kalam Technical University Web Technology Lab (KIT-551) Practical File Name: Sumy Mishra University Roll No.: 2)00]00| 30/2) +h Semester: SP Session: 203= DRG INDEX Name of Experiment Page | Dateot | Faculty | Number | Evaluation | Signature WAP inj ‘ mete to take input from user by using all the following | | © Command Line Arguments 25}9)203 © DatalnputStream Class 4-4 Hh © BufferedReader Class © Scanner Class Console Class > Array) and print all the values using loop statement, WAP in java which creates the variable size array Jagged | 5 25/9]2023 Lz rote WAP in java to implement the following types of inheritance: | © Single Inheritance 6-8 |2s]9]2023 | Multilevel Inheritance | * Hierarchical Inheritance | Hybrid Inheritance | Create a package named “Mathematics” and add a class | Satie PaaS: ade to add and subract matrices 2x2) 9711 | 3/t0/2003 = | Write a Java program importing the Mathematics package and AA use the classes defined in it. VZeN\ 5, | WAP in java to implement constructor chaining and | constructor overloading. 2-13 |9|J0]2023 6. | “Java does not support multiple inheritance but we ean \e-1s | lel to}203 achieve it by interface”. Write a program to justify the above statement. WAP in java to demonstrate that finally block is always 16 Ie] 10}202 executed whether exception occurred or not. WAP in java which creates two threads, “Even” thread and |) —) 16] lol 023 “Odd” thread and print the even no using Even Thread and odd no using Odd Thread. 9, | WAP in java which takes a name of a person as an input fm | q 44 | G||)] 2023} the user implement the followings: «Find the length of the string. | a Create the abbreviation of the name. |. Swap the case of all input characters. —_+—-— T Write a HTML program to display your complete class time Nat Gl} | 20%3 4 | 28-26 | 6|1)033 | 10. 13 15 16 17 18 <| Write a HTML program to divide web page using frames Write an HTML code to demonstrate the usage of inline CSS, intemal CSS, external CSS and imported CSS. Java script for Web Page to display Write a Java seript to validate | Id and Password. Name must contain alphabets and whitespace only | © Mobile number must be 10 digits only. Email Id must have one “@", and domain name is “united.ac.in Password must have atleast one alphabet, one digit and cone special character (!@#S%8&") Mobile Number, Email Writing program in XML for creation of DTD, which specifies set of rules. Create a style sheet in CSS/ XSL & display the document in internet explorer Write a program to implement Math server using TCP socket and also write a client program to send user input to Math server and display response as the square of the given mamber. aq | aof|23 | 8-29 | 29|)]]2023 | a] (1/2023 | 30 a)-34 | 20)/)|2033 | 3S-36 | 24|11]2805) 1 37-40 2A] i)]2023 | \ Write a program to illustrate CURD operations using JDBC connectivity with MySQL database. 41-43 | +] 12]2023| | 19 Write a SQL query to create and call the stored procedures with following specifications: Procedure without parameter and no return type Procedure with parameter and no return type Procedure with parameter and with return type a4— 95 | 4] 2/2028 20 | write a program to illustrate CURD operations using JSP ty with MySQL database on Apache Tomcat web 4fia}eos3 Experiment - @ a Objective — ; wedeetve—- WAP in gava to dake input From user y using all dhe following roedhode - © Command — Line Arguments © DotoInbutSteam — Class © BoffevedReacer Class © Scanner Class © Console Class Ii command — line srgumert9 class Commardlineinpur - public @atic void irain (Shing a) { ig (ogo: length ==2) { syennou pintdn[ Pease command Sine - 0-9 je inbt 08 0 2); else sem out Vegan dire - argument") ; for Cink d co) d< ange: length 5 iH : Sybtern- out: paintuln vrgoment (sy) +" + owpo [a]); frdn("You entered "+ ongd-degiht // Detoinputsirewm — Class Import awa ios 3 Closs User input-@sarn ple public Matic Ic Stir ' 2 Batic void rain (dd ig orga )) DataTnpute eom —clajainpitehream = new 4 DatanbubSbream (Seen in); coy § at Sybreen: ouk= print (“Enter integes’), int num aoteger porsednt (datadr put © lpm» “readline ()) > Z| SyGrem- out» pant Jn{* entered: "nvm ); Enter 4 double”); (cotadh putShew dase pat Stor * thse; Anlz0Eenepvion eo ‘ sien: er pinks (NE 7 en getnessage) J j 3 } BufferedReader Closs import —gava-io- BufFeredReader ; import gaa: 10: DOENception 5 import Java +!0- Input Sbyeam Reader; class Userdinbut i ; pobhe’ Qalic void main (shing ong LY) ' BufferedReader wedder = new Bollered Reader (new aputStream Reader (5)Aeen sind) I| Stoner Class Import — gava- Util Scanner} Class Userinpit pobic Gate vold main {Shing ang J) Stonner Scannny = new Scanner [Spee in ); ier 00+ = pitt (“Enter au yy String input Sting = scanner neat Line U ; SyBtem: outs printdin (“You entered infasting ); 2 scomney » Close 2 j J / console Class import gwa- To: Conse S closs Console console = Syem console (J, if (console == null) { ; oy ieenak- pointe (“Console 16 ho} available); Sydem. exit uy user Number = gnkeger . poco edie (“er Fi Wy) syjem-cu}: part dn (You ented ?-+ userNumbte) d —Dbgective - wap i a e9 e Ve in Java PIC oat }h Vorb byechive hich dh rab |e _Exberiment — 6) Sze amay (Jagged Av say) and print *"9 loop Peis - pink all dhe valuro class nggtdAvray public Soke void rot( JCI saggeatrroy 7 {1235, (Hs3, 16%% oJ; co; dc gagged Ay length 5 4-4) J lengthy a4) a) Ly for (ine di { for(int I-05 IS angg estcrayh ES 639 9 6 _Labeiment - 6) Objective — . . eedive— wap in gum fo iemplemert the sellwing yea of inhendomce :~ © Single inhertbonce © monileved inheritence © Hierarchical inheritence ® Hy brid inheritence [|Sivgle Anhesitance class Anima) | ) { void eat { cyétere- out - print ros! is eating”); J class Do eatends Arimod) { vid bork CJ { r ing’ 5 Siem out: paptin ("Oey booking"); Single f ig Qadic void main (9 og (J) f Deg oop = new Deg; dag. atl); dg bork O; Jj J JJ moldileved Irbert-once Class grand porert { void grondporent me) hod) { Sytem: out point dn (" Oprand porente jo”); ,J J Class parent @aterdo grorobovent ( void — porentmedhod () { Sytem-out: prinkln (“povente ") J Class Child extend powent { void childrnedhod Uf 7 Syftera-out print (" thild’e J class Multi { poblic Gate { ‘child = new Child 0, 6, geeondparent method Q oe evel) Child «child meehod 4 chi Md J I] Hierarchical — Tnhevitem ce class Shabe f void chm l{ Sy@ern outs prinkdn ("Orowiv, Gabe”, ] er otrt: prinkdn ("“Orowing abe 1) Class Ciycle e@xlendg Shape void dvawCircle OU { Sem out: printda (°Drowing civtle”) ; dass Rectangle — entenda Shope { void drawRectong le Of Sytem: out prinkdn (Drwieg ze gu) J lass Hier ovducal { public Static up y, rain (Shing opal) = wo Circle UL Circe Rectang le ag © = new Rectong le (J ecoctomple -dwaw UO, vechongle drow Rectong le (1; 7 Exheriment > 4 Obyechve— Cade a package nomed Mathematica” and & class Matin” with methode@ 10 add ond Subhack matrices (22), write a gova program tm porting. dhe Mad¢hemadied patkoge and use dhe classeg defined «int Mekhi Jove backage Mathematic® ; fublic class Matyi private int [ILI roodin ; public Matin Cin (IO mahin) Unis. mada = mats y 5 public Machin acl other) jr JC] /reoult = new int PIC]; for(i dco; dea dH) ; for(int JS 05 I677 att) © ell phi. mebrinli [9] tether mahinGill j alum new Madina (esult)j Z bublic Medyia Subbact(Motin odhex) IMCI(] vesulk= new jot BIBI; for(int dso; dea pdt 1, for(int J= 0; 5427 a4) T seat GIT = this. radian [o] [91] — other. mote ICT j atm new Neb (result); : ; public void peink fade) forlint dam L520 +p {. forlint J=es yeas ot t System. outs pein (rm wain+ * ”); System: out Py de 7 J Main: goua — smnbort — Maghernadica- Mat" 5 public class Main 1 public. etodie void main(String] og) i IMCIC] morvinOotat = 11125, 13,4) J) IMECIC] marinDataa = (4565, (7,055: Mabie mobil = new Matyin (madsiv Dated); Mohiw maliw2a = new Martin (matin ata2) : Sy@lem: out prints (*Madwia d2 ”) moalvind print Madina J; Systers sont» printeln ("Madoiw 2+ ") made a.print Matyie (7 Mobi sumMohiv = madrind: add Cmatain2) Sedlem- out printdn (“tn Matin LF Wadein 21”) Suman. oink Macha (J Metin diffMadbig = madyind- Sub drack Seem: out point (“in Matin 2 = Mate aifP Madria « paint raha); (readin); is Matin 2: yo 12 \ mobi 1 podria 2! 4-4 4 4 _Exbecin nt ©) i Obitdive— AP in gave to implement —tonPrurtor cheining and —oracter overloading — Lonshuctor chaining. class Temp Temp dhis (SJ 5 , Sytem out: printdn “The Default corGheuctor”); J Temp Cin) { dhis(s, 1S)E j Seem: out: printde (%) aft ; a Temp (ink % int y) { ‘Siers-out print Tre default conductor —ConGleuctor Overloading : fublic class Box { cbuble width, height , clepth> int — boo Box (double w, double h , couble dy int nom) width= w) beig ht =h depth = d} bowNo = num; J box U) { wideh = height = depth=o) J 7 Bow (tht nor) this U7 boxNo = 1 Jj . . public Sadie old rain (shirg EJ og) { Bow dort = new Bon (Le System: out printdn (bowd: wie Hh), J J ouput — 0-0 Enberirnent_No - © 4 Object ve - "Juve clore not Support —roulttple — inhradance bol we can achieve it 0 interfaue”. Waite a program to otlity the above = adtement + [Define dhe fixe — interface interface Animal { void eat} void sleep): N0efine Phe second — interface interface Mamma, void giveBith U; 3 [/irplemert jnteacea in a class class Big implercerta Anima), Marna public void eat) t Syden- out - printdle (“Dog fs enting); J | public void AeepU T sae outs prtbel™0ug. sehig’) 3 (s buble void giveBirthU Seétem-out- printdn (“Cog giver birdh to fubpioe'): J 3 poblic class. Maint) public atic void — mean (shina 7 ogg) Deg myo = new Doge: m Ong -eat VU; ™ Dog: Sleep ro eg s grebiedU; citteh- py ic ent De is € “4 Dog gives bidh to pebbies Exberiment No-() 16 | Okpdive— WAP in gave to clemondhate — Rat Ball; bloods i's alway eoecuted — whether Ca public closs fret excepion occured bubhic slodic void evan (Shira [7 ong?) q tyf int -reevlk = lo/o 5 Soleo: oud printuln ("Resolh” + xesuld); catch ( drithmedicEuce pron e) éption cong lt own ‘ Sem: out + brinteln (" get Message U)> J Finally { ; , Sylem-our+ bintdle fe Finally look is cnoated’) J ayGenatl: pinkh( pogrom contioues after dhe fey cach Fially blocks”); Jj J put Exception — caught? / by Zero ™ Finally block " cool progim —continves afte the toy~Cadch #nally Boeds 1+ Enheriment. No- @) Objective — yap in gova whith orealee two Heade , “Even” dread ond “odd? tread and pink the even no wing Even dread and odd no, ceeiyg Odd tread — Class Even ewtenda@ — Thread public void wn for(in. deo; dele ti) if(dv~acso) ‘ SyGten sour: brink ("Event ip: jo j J class Odd a Thread { public void ant) for(int deo; G<)0; 044) t iF (dy2)=0) monk nt j J gd class ted p 4 poblic Bake void main( Aeing] args) 1 Even obgd = new Even (J; Obl: Hort O 5 Odd oboe new Odd (35 Obga: Sart U- _Exberiment No—@) 19 whith Jakeo a name of goa dhe user —imbjement Objective— wap jn Q person as am jmp fem dhe — followinge — © Fird dhe deegth of the Shing abbreviation of the name © Create the © Swab éhe case of all input charade impost §— gave tttil- Scanner; poblic class tect public stale void main [Sina [J ovge pid Stapner Scanner = new Scanner (SyAem in) 3 Sytem oul + printdn [4 Enter ame”): Stn hame = stanner+ Close (zy j = rrarae: JergthC]; SyGem out: prirtdn (“length of be nome” + leogth); Shing [J] nomePorta = name- Zhtmd> Time Table Z}head> ineeeing and Rescordh Zcenter > United College of bg <|hi> zha> B TECH V SEMESTER TIME Tate <]b2> Zeaphion > wr ref do Mog 30p3 cable border = “1"> 2" > Branch! TT 2th colspon 342" > Sections H< [th> Room N <]th> Lth —colshan = "> WeEH Zh i> Zth celspon ="4" > Class Fnchorge Zth celsbon = Gg" > 6299516099 < th> Z| tr> <40> ZAth> DAY <|th> SAS 9il0 S/LAD 10! 1) sia 2] th> 2: 1<(th> Zth>}:2<[th> Sth> 213 <)th> ZEND 3B» 44 [END 4te> ci : ZAK> Monday. 2] th> zid> WT <[4d> Ztgy LR ae Zta> Pan4ltd? eig> DBMS zid> wT Tuesd 2)th> zid> LR< td> eddy COL Zid> PAA Zhdy OBMS <}td > ctd> PSP ZAdz_MAaTH c]t%> Wedne sda Cot < Ha> DAA Zid> PR Std> CoT 2htd> eae mh <4d> Oosp <)4d> Ziv Zbb> Thorsdoy Zids HRMS ZItd> 24g> wT ML Z4ds OSD td > 9sD cltd> ee Lay MATH we oro Zah> Pride <14h> etd> WT ys" > LAB <)td> Zag Ape selon: chd> WT Zttd> eta> pps <14d> cAd> Cor ctd> PSP cl4td> ante? Sodurrdagt 4) th> wT 24d > LAB le = “wbr! blue" > pems Atd sy eid> WT <)td> Ztd> MATH Ltd > PSP Papeoy fies fo <[cen\er > Z| body> Zfbinl> _Expesimert No ~ @ as Objedive— write og HTML rogram 40 display the given need dia — 4. Coffee 2 Tea A. Black tec 2 Green tea 8: nile ° Black Mi} ° Gree Mile 4. Cheese zhiml> < head’ > Zkhe> Nebed Li€k> a
    . Zhi > Coffee <)> Zdi> Tea Zod> . Black tea<|dbi> Orreen bea Llok> ahdi> 2di> Milk cud> . Z0i> Black Milk sid
  1. Oreen Mills i> i Cheege > aibml> Exherme Yyotr th HTML broavam to divide ¢ frameg — — Write 4 web page using ¢ =|pocTYPE btmd> ZHU Use Frame <]Lite> < fromeset rows = “aon, Got, 207” Frome names “top” src= "c3 JUsers | abet. rp” > “pain” sxc = “Ci fosees | adra-po9”> frome rome = “boftom” ere = “C2 Jusers/ atte 3 pma"> Zrofromes > _ doee not | nofrarea> <[Fromeset> Z|htad> _ Bubeximent No- (13) 20 Objective rile on HTML ede to cemonghate dh 5 re usage of inline CSS, inlernad css » Ceternal ess amd imported = CSS Zhimd> CSS <[Htle> Zbink veh =" oigleet” ayhe = Newt fss! brveP= "ng speest> dink ved =" atglosheed” the = “Feobkfess” hee £ = "imordeg css" body f ¥ d bavkground — lori blues J «para { Z)8gle> <| head > Zbody> Zhi Class = “para” > Tnterral css Zho syle = color: ved;""> Fnline Css ep css = "4e"> This is 0 Lwternal 045 and dhs is the enum ple of — bet css enannble

    29 ha> Porageabh of Eaten) ess

    clotaderiad of huported CSS CPaueh le

    Browser Name: + i ifator- opp Name + ipo"), joni "+ nawigator.app Version + “eyp>"); clocumen}: write (“

    Browser clowwment- ware (“ap > Cookies Enabled + "+ rawigaton coofs ie Enabled “ip>”); docomen|-wnite(*ZP> Online Status "+ rawigator. online + "ejps”). dovument- write("

    PlaHfowre +” nonigaior: bheHferm +Yp>”): esp? Z} body> htm Enbesirent No- (3 Urile a Jon Seribt 0 validate Name, Okjecive - id amd password — rmobile nurnber , Email contain adphatele ond —cuhife xhave on 0) oighte ong ond — dorain name OName mud © Mobile number moxb be id mut fave one #6)” © Email Ss tunlted-acc ip? 6 ® fossword mvt hone atdeakk one abhabe} , digit ord one Gecrad choracter (1 OH-K 4 24) one Zhtmd> Zhead> Z4title’> Form validation <]-Li: form \alidation <|hi>


    Zabel» fore = “mobile? > Mobile Number = tt i Sigle = “olen: ved” >< Jeon Password <) abel > <)sbom>
    Zinput tye = “submit? value = “eubmiL”> 1 forme > fonction — validateForrol J . { fe “ var nome s document}: get Berne} 3y Id (“rame? -volue ; Elemeot by Jal (“mobile?S value! «gp Element 4" poe) value,’ yore mobije = document. vorr prnai] = doey Vere password coorment+ ge Elernent- G20" password”) “Value; []Naxe — vallrdutiow varr nameRepeye = [*[a-zA-Z\5] +4]; iE (Irorne Regex » tect ( named) document « genelementy Zo (“name Error ”)- ionerHTML = | ” "namp tnbt orbaiu alphabet® aud whidecpace on i welen false | 33 } che cotvment: gel Elemenbty Td (rome Exar"): innerHTmL = "4 J I[ Mobile rs. validation var mobileRegex = /N\d{ojt/; Le ( 1mobileRegex ste (mobile) ) docuren get Elemenk By Sd (“motieEeror’) jonecHTML = { mobiJe number must be 18 dpe ony"); rele false 3 Joe document: element By Fd (“nob "inne HTL =? J j/€tei| Validation vor emailReger = ff [o-2A-Z0-4. ohh] @onited\- ac\-inB/; if ( LemailRegen 406 (email) { qoeurmpnt got Ebrent ty 7d (emai) Bor”) sinnesHyTML = “Eire | id mud have one @» and domain name rs tunited ZI body> <{hbmd> Enbriment No— 0 ss sedive— ony en . Objective — Writing frogram in xm Loy evasion of’ OTD, which specified set of ruleo. Grate a Gyle Greet in C8S/xSL_ and diplay dhe document in Trtemet —— enblover — qxmd version = "0" encoding = “UTF-6"9> <9 xXmd- SileSheet type = “4eetfess! nef = "Siyle-css"? > ZNELEMENT name (#:PCDATA) > ZIELEMENT age (HPcDATA)> I> hame>Sviag Mibla <[home> Kage 28 <}beson > ; Zrome> Mikhra Suva AS <}oge> <|peeson> Sige ess. deta { clicplog: blocks} mowpin | dopx,; J erson _ dlispleg: block; mrogin bottom : ope; J name font - weight’ bold ; J age m color: #666) J Enbesiment — Object! F ae eS Write a pogrum to implement Math se using TCP SockeL ard = algo wtte popom to send ste input to Math = sexvrr and — lik) vesporot ag the cquowe Of = dhe ger number — marth Java— import ouasion jmpork — Towa nob *} foblic class math { publ Gabe void rain Ghirgl ] ange) 4 L irk pertNumbrr = SSSS> taf ServerSodket cesverSodset = Nw ServerSocke {for ie) , { meth senor JS weiting Senor -pinkdn(* fer connection”) ; while (ewe) Sorket client Sten out-printde (° Sooke < serverSockel- acceptU,” "client connected? ”+ client Socket + grtret Address); jest Harel ler Trveod ClientHordler = new Tread (new (clientSovked); chentHordinr . at); J J, Peete $ @: print Stork Face C): J 3 Gatic class clier+Hamdler implementa — Punnable privele Socket chitnt- Borde; bublic elientHandler-(Socke+ — clieat Sooke) { this. chentSocke = el’entSocket-; public void sun.) { ul PrinkWeiter out = new PeinkWriter (diertSockel- . get Oatprkshreoml), but)j Bul fovedeader in = new BufferedReader (new ToputGheareReader (clienbSodsed- getdnpot Steve) i jf Shin’ inputLine while (Cinhut line = in-neadlire ) | = null) t yt Ghuble number = Double - pose Pouble (1 topurkLsne) dloub)e Spore = number % rumber ; Sflem out println [spore of" J Catch (Mumber Format Enebt fon e) tromber 4. "jc. "+ spore); t gyéem out: println (°Favalid Input”); 3 cath (ZOEKeption e) e rintStatk Trace C5 J j J J J Client « Jana <— jmbort: gana: }0-33 imo qunerels pob)ic class chert * ie Gotic void roan (Sbivg [I og?) Shing geverdddress = "localhost "s ink seever Port = sess 5 by Sake chet = reo Sickel (seer, cenmrfert| Privtiriter out = new Printvbiter (sooke- get Output Sheam |} tue); BufferedReader in = new BufferedReader (new Input rearnfendr Csodlet-getInputShrear (J): Poffered Reader userInput = new BufferedReader (new Toput Stream Reader (sem-inJ); Syem= ott foi (“Erber a rormber! ») String. User Number = user Input + read LineU; SySem: out peti (vse Numbes); Shin server Pedbonte = fins vead Line (J) Siem out: print in (“Sever srecpon se ) + corverkechense]s J . catth (LOEncebtion J t e. point Stoke Pace; J J 3 EE Experiment No~ fg) Objedive — Write 9 pogrom to illudhate CORO Obevat ione acing JOBC connec vit with —MySOL database — d tmbort yaw oq ®; poblic class te privote lotic final String URL = ade os mysql] Jocalhot : 2306 //yewr-databave rae”, peivele Bodie Final Sheng USER = “vSerrawe” ; private Gate fire! Shivg Password =“ password”, poblic fabio void main (Shing LJ ong) dhrowe SOLEXcepyon Connection con = DriverManager. get Connection (vet, USER, Password ) ; eveateRecord (ton , "suvag” , “ suvag @ prnei cou "yr nead Record (con, 43 UpdatePecord (con ,4, Mamay" ') * svvag @grrail-coa”) dnierRecovd (con, 4) on: close > a . 42 boblic Salic yeid cvtateRecord (Connecdion im, Seng home , Shing email) dhrowe SOL Exception Shing spd s “inser Indo veer (name, email) veluea (2,2) ” PrrbowedSatement ee = Conn prebore Stadement: (59.0); Bt. selShing (4, naure): St seh Shiite (2, email) * St eveurte Ohclate(); SyGem-oul- pritln(™ Record iuserded ”): J poblic — Aede. voicl m sad Record (Gnnedion en + ink id ) Hrrowea — SOLEnceptvon abi sq = “seled 0 from er where id = 9”) Prepared Sateren| st = con prebareSladement (54.4) A+ Int (4, Id); Pesulls Se ves = she oweaute Query (J while (7 -nmt0)) 1 Seem. out- potila (Fx) "q os. get Int (*Td?)] ; Sytem eat: brid ("Name of vs. gel Serj feraue?)) 5 SyGem-out> print (" Grail "4 ors gel Shing. “email J 43 SyGen. oul. printdn C wood "); poblit @atic ueid Updode Recosd Fonnechion con, tut td y Shi ramet y Shing email) - Hnewa GOLEncebtion { Shing sqd = “update wer cok names 2 pemaj| = 9 whee id= 7”: Pot poredStalerren st = cen. prepare Statement (sql); A. SASting (4, Nome) St. set Shing (2, eral) Ste Shing (3, id); st enearle Update () » Sythem out + friulln ("Recexd updated”); j peblic sladic veid cbleteRecovd (Cennedion con, tie id) Howe —SOLEaception Shing sqls “Dekte from oree whore id= 0 PreporegStadement SL = cons prtpave Sdadernent (59d) ; st. setant (4, fd): sl. entatte Update (J; sien et pide ("Record J 3 J deleted”) 5 ‘Pxprinenl Vo (6) 44 Objedive— Write a SOL quey to oreate and call the loved frrocadvceg with Blowin Speci freationa? © Procedure without porameler and np relyrn re ® Procedure with pforumeder and no return dupe © Procedure wit, forameler and with wait tye [] Procedure withoub parame and 1 -relorn pr CREATE PROCEDURE sp Whthout- Paremeler dnd Nofelurn y pe AS BEGIN ~~ SOL Gat_mente END; (10 EXEC gb WitheutParametos And No Return Type | [[Preceame with puumeter and re vdorn ype CREATE PROCEDURE @porameder Name chia—dype AS BEVIN — SOL Sadement END; GO : EHEC sp- With Perameder BNO No Peto Type @porameter Value ; Sh— With PocrameterAndl No Redon’ pe i 4s |] Procecuree with porameles ord — with eto he CREATE PROCEDURE ‘}-WidhPecaler del Bedan"y pe @ poramelerName chaiatybe RETURNS int AS BEGIN == SOL Satem ent RETURN @atiyrn Value} END; G0 DECLARE @relvmValue Int; EXEC. sh—VidhPorareter dnd Petorn Type @purvmeterValie, @rcom Value - OUTPUT; SELECT @ vlemVelue _Exheriment: No— 63) Obj edive— While a frapror to illustrate CURD Operations — usin asp panne vit with myst databane on pache Tomcat = ewe server 9) — <+® page import ~ “youa-sqd- %" of > ux hind> , Zier CRUD oberation <|head> Zo i Shing gdbcurRL = wgpbes mgogd 1/f locaphod: > 2306 / veer”) Shire Jdbelser = " gum’; String Jd bc Password — & passwerd” Connedtfon con = hell; ‘ ‘ Statement st = null; Result Se v8 = nol; ‘ : p t Chess. forNare (“com rgsqd “Cf ddbe- Prive) con = Driver Mmater. gettonnedron(aabaurt , Het ther, Gc Pasned); Shing ror Gens < Cinteete . a Pudo em (name, oge) valuce Cc 9 ; 4) ns tog (Porporedsitoderent prthore Stalement. < Cone Soler ¢ tne 4 prefered Shatenenesset ing (4, "obn" J ; frebored Stadenent.celTnt (9, 80); freboredSladement -enearte Update (0; J Shing selec Guege = Useleck % from emp" st = con - crtacte Stadement () ; vg = &&- encute dy (selec Once J; otk: printdn (“ Employee vecerd ")} oub- priehdn (“table border —'4' > ely > ths TP ath > Nawe <(thd 2thd wee her mi) while Cos- neetO) f out +pouthlle (Meee?) 5 i out pinks (Hetd pte vs. gobi (SFa)# Mel); ott: prinkdn (Set dd" 495+ gedShing (Cramee?y Melee) | pudepinddn (cay? bas: getznk (ge) + Le; eu pinkdn (“CoH J Oud -prinkde (“”); eine pan oy = '“ypolade emp set ae = 81 where name = ohh!" » st: neue Updete (upde ourny t) String. delete Ouro = “Delete fom — emp where home = ®t ohn! tig st- eveuteU pdo¥e (delete Quer) J catch (exception @) t e+ point Stark Trace (J) I b> Z [body> <[himd?

    You might also like