12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515 |
- <?xml version="1.0"?>
- <doc>
- <assembly>
- <name>Microsoft.Data.SqlClient</name>
- </assembly>
- <members>
- <member name="T:Microsoft.Data.OperationAbortedException">
- <summary>This exception is thrown when an ongoing operation is aborted by the user.</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- This exception indicates that an operation has been aborted by the consumer of an API.
- For example, if the event handler of the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.SqlRowsCopied> event sets the **Abort** property to `true` in the <xref:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs> object passed to the handler, the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method stops sending rows to the server and throws an <xref:Microsoft.Data.OperationAbortedException>.
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.Sql.SqlNotificationRequest">
- <summary>Represents a request for notification for a given command.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This class provides low-level access to the query notification services exposed by SQL Server 2005. For most applications the <xref:Microsoft.Data.SqlClient.SqlDependency> class provides a simpler way of using query notifications. However, if you need fine control over when notifications occur, or you need to customize the message data returned as part of a notification, the <xref:Microsoft.Data.Sql.SqlNotificationRequest> class is the one to use.
- ]]></format>
- </remarks><related type="Article" href="~/docs/framework/data/adonet/sql/query-notifications-in-sql-server.md">Using Query Notifications</related>
- </member>
- <member name="M:Microsoft.Data.Sql.SqlNotificationRequest.#ctor">
- <summary>Creates a new instance of the <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> class with default values.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- If the parameterless constructor is used to create a <xref:Microsoft.Data.Sql.SqlNotificationRequest> object, that instance must have its <xref:Microsoft.Data.Sql.SqlNotificationRequest.UserData%2A> and <xref:Microsoft.Data.Sql.SqlNotificationRequest.Options%2A> properties initialized before assigning the object to a <xref:Microsoft.Data.SqlClient.SqlCommand> object's <xref:Microsoft.Data.SqlClient.SqlCommand.Notification%2A> property. The default values used by the constructor are NULL (`Nothing` in Visual Basic) for the <xref:Microsoft.Data.Sql.SqlNotificationRequest.UserData%2A>, an empty string for the <xref:Microsoft.Data.Sql.SqlNotificationRequest.Options%2A>, and zero for the <xref:Microsoft.Data.Sql.SqlNotificationRequest.Timeout%2A>.
- ]]></format>
- </remarks><related type="Article" href="~/docs/framework/data/adonet/sql/query-notifications-in-sql-server.md">Using Query Notifications</related>
- </member>
- <member name="M:Microsoft.Data.Sql.SqlNotificationRequest.#ctor(System.String,System.String,System.Int32)">
- <param name="userData">A string that contains an application-specific identifier for this notification. It is not used by the notifications infrastructure, but it allows you to associate notifications with the application state. The value indicated in this parameter is included in the Service Broker queue message.</param><param name="options">A string that contains the Service Broker service name where notification messages are posted, and it must include a database name or a Service Broker instance GUID that restricts the scope of the service name lookup to a particular database. For more information about the format of the <paramref name="options" /> parameter, see <see cref="P:Microsoft.Data.Sql.SqlNotificationRequest.Options" />.</param><param name="timeout">The time, in seconds, to wait for a notification message.</param><summary>Creates a new instance of the <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> class with a user-defined string that identifies a particular notification request, the name of a predefined SQL Server 2005 Service Broker service name, and the time-out period, measured in seconds.</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- This constructor allows you to initialize a new <xref:Microsoft.Data.Sql.SqlNotificationRequest> instance, providing your own identifier, the SQL Server 2005 Service Broker service name, and a time-out value.
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The value of the <paramref name="options" /> parameter is NULL.</exception><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="options" /> or <paramref name="userData" /> parameter is longer than <see langword="uint16.MaxValue" /> or the value in the <paramref name="timeout" /> parameter is less than zero.</exception><related type="Article" href="~/docs/framework/data/adonet/sql/query-notifications-in-sql-server.md">Using Query Notifications</related>
- </member>
- <member name="P:Microsoft.Data.Sql.SqlNotificationRequest.Options">
- <summary>Gets or sets the SQL Server Service Broker service name where notification messages are posted.</summary><value>
- <see langword="string" /> that contains the SQL Server 2005 Service Broker service name where notification messages are posted and the database or service broker instance GUID to scope the server name lookup.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The value of the <xref:Microsoft.Data.Sql.SqlNotificationRequest.Options%2A> property has the following format:
- `service=<service-name>{;(local database=<database>|broker instance=<broker instance>)}`
- For example, if you use the service "myservice" in the database "AdventureWorks" the format is:
- `service=myservice;local database=AdventureWorks`
- The SQL Server Service Broker service must be previously configured on the server. In addition, a Service Broker service and queue must be defined and security access granted as needed. See the SQL Server 2005 documentation for more information.
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The value is NULL.</exception><exception cref="T:System.ArgumentException">The value is longer than <see langword="uint16.MaxValue" />.</exception><related type="Article" href="~/docs/framework/data/adonet/sql/query-notifications-in-sql-server.md">Using Query Notifications</related>
- </member>
- <member name="P:Microsoft.Data.Sql.SqlNotificationRequest.Timeout">
- <summary>Gets or sets a value that specifies how long SQL Server waits for a change to occur before the operation times out.</summary><value>A signed integer value that specifies, in seconds, how long SQL Server waits for a change to occur before the operation times out.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- After the time-out period expires, the notification is sent even if no change takes place. The <xref:Microsoft.Data.Sql.SqlNotificationRequest.Timeout%2A> property defaults to the value set on the server.
- ]]></format>
- </remarks><exception cref="T:System.ArgumentOutOfRangeException">The value is less than zero.</exception><related type="Article" href="~/docs/framework/data/adonet/sql/query-notifications-in-sql-server.md">Using Query Notifications</related>
- </member>
- <member name="P:Microsoft.Data.Sql.SqlNotificationRequest.UserData">
- <summary>Gets or sets an application-specific identifier for this notification.</summary><value>A <see langword="string" /> value of the application-specific identifier for this notification.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This value is not used by the notifications infrastructure. Instead, it is a mechanism that allows an application to associate notifications with application state. The value specified in the <xref:Microsoft.Data.Sql.SqlNotificationRequest.UserData%2A> property is included in the SQL Server 2005 queue message.
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The value is longer than <see langword="uint16.MaxValue" />.</exception><related type="Article" href="~/docs/framework/data/adonet/sql/query-notifications-in-sql-server.md">Using Query Notifications</related>
- </member>
- <member name="T:Microsoft.Data.SqlClient.ApplicationIntent">
- <summary>
- Specifies a value for <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ApplicationIntent" />. Possible values are <see langword="ReadWrite" /> and <see langword="ReadOnly" />.
- </summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.ApplicationIntent.ReadOnly">
- <summary>The application workload type when connecting to a server is read only.</summary><returns>1</returns><value>1</value>
- </member>
- <member name="F:Microsoft.Data.SqlClient.ApplicationIntent.ReadWrite">
- <summary>The application workload type when connecting to a server is read write.</summary><returns>0</returns><value>0</value>
- </member>
- <member name="T:Microsoft.Data.SqlClient.OnChangeEventHandler">
- <OnChangeEventHandler>
- <param name="sender">The source of the event.</param>
- <param name="e">A <see cref="T:Microsoft.Data.SqlClient.SqlNotificationEventArgs" /> object that contains the event data.</param>
- <summary>Handles the <see cref="E:Microsoft.Data.SqlClient.SqlDependency.OnChange" /> event that is fired when a notification is received for any of the commands associated with a <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> object.</summary>
- <remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlDependency.OnChange> event does not necessarily imply a change in the data. Other circumstances, such as time-out expired and failure to set the notification request, also generate <xref:Microsoft.Data.SqlClient.SqlDependency.OnChange>.
- ]]></format>
- </remarks>
- </OnChangeEventHandler>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SortOrder">
- <summary>
- Specifies how rows of data are sorted.
- </summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SortOrder.Unspecified">
- <summary>The default. No sort order is specified.</summary><value>-1</value><returns>-1</returns>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SortOrder.Ascending">
- <summary>Rows are sorted in ascending order.</summary><value>0</value><returns>0</returns>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SortOrder.Descending">
- <summary>Rows are sorted in descending order.</summary><value>1</value><returns>1</returns>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlAuthenticationInitializer">
- <summary>Called from constructors in derived classes to initialize the <see cref="T:Microsoft.Data.SqlClient.SqlAuthenticationInitializer" /> class.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationInitializer.#ctor">
- <summary>Default Constructor to initialize the <see cref="T:Microsoft.Data.SqlClient.SqlAuthenticationInitializer" /> class.</summary>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationInitializer.Initialize">
- <summary>When overridden in a derived class, initializes the authentication initializer. This method is called by the <see cref="M:Microsoft.Data.SqlClient.SqlAuthenticationInitializer.#ctor" /> constructor during startup.</summary>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlAuthenticationMethod">
- <summary>Describes the different SQL authentication methods that can be used by a client connecting to Azure SQL Database. For details, see <see href="https://docs.microsoft.com/azure/sql-database/sql-database-aad-authentication">Connecting to SQL Database By Using Azure Active Directory Authentication</see>.
- </summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlAuthenticationMethod.ActiveDirectoryIntegrated">
- <summary>The authentication method uses Active Directory Integrated. Use Active Directory Integrated to connect to a SQL Database using integrated Windows authentication. Available for .NET Framework applications only.</summary><value>3</value>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlAuthenticationMethod.ActiveDirectoryInteractive">
- <summary>The authentication method uses Active Directory Interactive. Available since the .NET Framework 4.7.2 and for .NET Framework applications only.</summary><value>4</value>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlAuthenticationMethod.ActiveDirectoryPassword">
- <summary>The authentication method uses Active Directory Password. Use Active Directory Password to connect to a SQL Database using an Azure AD principal name and password.</summary><value>2</value>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlAuthenticationMethod.NotSpecified">
- <summary>The authentication method is not specified.</summary><value>0</value>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlAuthenticationMethod.SqlPassword">
- <summary>The authentication method is Sql Password.</summary><value>1</value>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlAuthenticationParameters">
- <summary>Represents AD authentication parameters passed by a driver to authentication providers.</summary>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationParameters.#ctor(Microsoft.Data.SqlClient.SqlAuthenticationMethod,System.String,System.String,System.String,System.String,System.String,System.String,System.Guid)">
- <param name="authenticationMethod">One of the enumeration values that specifies the authentication method.</param><param name="serverName">The server name.</param><param name="databaseName">The database name.</param><param name="resource">The resource URI.</param><param name="authority">The authority URI.</param><param name="userId">The user login name/ID.</param><param name="password">The user password.</param><param name="connectionId">The connection ID.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlAuthenticationParameters" />
- class using the specified authentication method, server name, database name, resource URI, authority URI, user login name/ID, user password and connection ID.</summary>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationParameters.AuthenticationMethod">
- <summary>Gets the authentication method.</summary><value>The authentication method.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationParameters.Authority">
- <summary>Gets the authority URI.</summary><value>The authority URI.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationParameters.ConnectionId">
- <summary>Gets the connection ID.</summary><value>The connection ID.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationParameters.DatabaseName">
- <summary>Gets the database name.</summary><value>The database name.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationParameters.Password">
- <summary>Gets the user password.</summary><value>The user password.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationParameters.Resource">
- <summary>The resource URIs.</summary><value>The resource URI.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationParameters.ServerName">
- <summary>Gets the server name.</summary><value>The server name.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationParameters.UserId">
- <summary>Gets the user login name/ID.</summary><value>The user login name/ID.</value>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlAuthenticationProvider">
- <summary>Defines the core behavior of authentication providers and provides a base class for derived classes. </summary><remarks>Derived classes must provide a parameterless constructor if they can be instantiated from the app.config file.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationProvider.#ctor">
- <summary>Called from constructors in derived classes to initialize the <see cref="T:Microsoft.Data.SqlClient.SqlAuthenticationProvider" /> class.</summary>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationProvider.AcquireTokenAsync(Microsoft.Data.SqlClient.SqlAuthenticationParameters)">
- <param name="parameters">The Active Directory authentication parameters passed by the driver to authentication providers.</param><summary>Acquires a security token from the authority.</summary><returns>Represents an asynchronous operation that returns the AD authentication token.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationProvider.BeforeLoad(Microsoft.Data.SqlClient.SqlAuthenticationMethod)">
- <param name="authenticationMethod">The authentication method.</param><summary>This method is called immediately before the provider is added to SQL drivers registry. </summary><remarks>Avoid performing long-waiting tasks in this method, since it can block other threads from accessing the provider registry.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationProvider.BeforeUnload(Microsoft.Data.SqlClient.SqlAuthenticationMethod)">
- <param name="authenticationMethod">The authentication method.</param><summary>This method is called immediately before the provider is removed from the SQL drivers registry. </summary><remarks>For example, this method is called when a different provider with the same authentication method overrides this provider in the SQL drivers registry. Avoid performing long-waiting task in this method, since it can block other threads from accessing the provider registry.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationProvider.GetProvider(Microsoft.Data.SqlClient.SqlAuthenticationMethod)">
- <param name="authenticationMethod">The authentication method.</param><summary>Gets an authentication provider by method.</summary><returns>The authentication provider or <see langword="null" /> if not found.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationProvider.IsSupported(Microsoft.Data.SqlClient.SqlAuthenticationMethod)">
- <param name="authenticationMethod">The authentication method.</param><summary>Indicates whether the specified authentication method is supported.</summary><returns>
- <see langword="true" /> if the specified authentication method is supported; otherwise, <see langword="false" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationProvider.SetProvider(Microsoft.Data.SqlClient.SqlAuthenticationMethod,Microsoft.Data.SqlClient.SqlAuthenticationProvider)">
- <param name="authenticationMethod">The authentication method.</param><param name="provider">The authentication provider.</param><summary>Sets an authentication provider by method.</summary><returns>
- <see langword="true" /> if the operation succeeded; otherwise, <see langword="false" /> (for example, the existing provider disallows overriding).
- </returns><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlAuthenticationToken">
- <summary>Represents an AD authentication token.</summary>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlAuthenticationToken.#ctor(System.String,System.DateTimeOffset)">
- <param name="accessToken">The access token.</param><param name="expiresOn">The token expiration time.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlAuthenticationToken" /> class.</summary><exception cref="T:System.ArgumentNullException">The <paramref name="accessToken" />parameter is <see langword="null" />or empty.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationToken.AccessToken">
- <summary>Gets the token string.</summary><value>The token string.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlAuthenticationToken.ExpiresOn">
- <summary>Gets the token expiration time.</summary><value>The token expiration time.</value>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlBulkCopy">
- <summary>
- Lets you efficiently bulk load a SQL Server table with data from another source.
- </summary><remarks>
- <format ttype="text/markdown"><![CDATA[
- ## Remarks
- Microsoft SQL Server includes a popular command-prompt utility named **bcp** for moving data from one table to another, whether on a single server or between servers. The <see cref="Microsoft.Data.SqlClient.SqlBulkCopy"/> class lets you write managed code solutions that provide similar functionality. There are other ways to load data into a SQL Server table (INSERT statements, for example), but <see cref="Microsoft.Data.SqlClient.SqlBulkCopy"/> offers a significant performance advantage over them. The <see cref="Microsoft.Data.SqlClient.SqlBulkCopy"/> class can be used to write data only to SQL Server tables. However, the data source is not limited to SQL Server; any data source can be used, as long as the data can be loaded to a <see cref="System.Data.DataTable"/> instance or read with a <see cref="System.Data.IDataReader"/> instance. <see cref="Microsoft.Data.SqlClient.SqlBulkCopy"/> will fail when bulk loading a <see cref="System.Data.DataTable"/> column of type <see cref="System.Data.SqlTypes.SqlDateTime"/> into a SQL Server column whose type is one of the date/time types added in SQL Server 2008.
- ## Examples
- The following console application demonstrates how to load data using the <xref=Microsoft.Data.SqlClient.SqlBulkCopy> class.
- In this example, a <xref=Microsoft.Data.SqlClient.SqlDataReader> is used to copy data from the **Production.Product** table in the SQL Server **AdventureWorks** database to a similar table in the same database.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[BulkCopy.Single#1](~/../sqlclient/doc/samples/SqlBulkCopy_Single.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.#ctor(Microsoft.Data.SqlClient.SqlConnection)">
- <param name="connection">
- The already open
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- instance that will be used to perform the bulk copy operation. If your connection string does not use
- <see langword="Integrated Security = true" />
- , you can use
- <see cref="T:Microsoft.Data.SqlClient.SqlCredential" />
- to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string.
- </param><summary>
- Initializes a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- class using the specified open instance of
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- .
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Because the connection is already open when the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instance is initialized, the connection remains open after the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instance is closed.
- If the `connection` argument is null, an <xref:System.ArgumentNullException> is thrown.
-
- ## Examples
- The following console application demonstrates how to bulk load data using a connection that is already open. In this example, a <xref:Microsoft.Data.SqlClient.SqlDataReader>
- is used to copy data from the **Production.Product** table in the SQL Server **AdventureWorks** database to a similar table in the same database. This example is for demonstration
- purposes only. You would not use `SqlBulkCopy` to move data from one table to another in the same database in a production application.
- Note that the source data does not have to be located on SQL Server; you can use any data source that can be read to an <xref:System.Data.IDataReader> or loaded to a
- <xref:System.Data.DataTable>.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[BulkCopy.Single#1](~/../sqlclient/doc/samples/SqlBulkCopy_Single.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.#ctor(Microsoft.Data.SqlClient.SqlConnection,Microsoft.Data.SqlClient.SqlBulkCopyOptions,Microsoft.Data.SqlClient.SqlTransaction)">
- <param name="connection">
- The already open
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- instance that will be used to perform the bulk copy. If your connection string does not use
- <see langword="Integrated Security = true" />
- , you can use
- <see cref="T:Microsoft.Data.SqlClient.SqlCredential" />
- to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string.
- </param><param name="copyOptions">
- A combination of values from the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyOptions" />
- enumeration that determines which data source rows are copied to the destination table.
- </param><param name="externalTransaction">
- An existing
- <see cref="T:Microsoft.Data.SqlClient.SqlTransaction" />
- instance under which the bulk copy will occur.
- </param><summary>
- Initializes a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- class using the supplied existing open instance of
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- . The
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- instance behaves according to options supplied in the
- <paramref name="copyOptions" />
- parameter. If a non-null
- <see cref="T:Microsoft.Data.SqlClient.SqlTransaction" />
- is supplied, the copy operations will be performed within that transaction.
- </summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><related type="Article" href="https://msdn.microsoft.com/library/83a7a0d2-8018-4354-97b9-0b1d99f8342b">
- Performing Bulk Copy Operations
- </related><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">
- ADO.NET Overview
- </related>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.#ctor(System.String)">
- <param name="connectionString">
- The string defining the connection that will be opened for use by the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- instance.
- If your connection string does not use
- <see langword="Integrated Security = true" />
- , you can use
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.#ctor(Microsoft.Data.SqlClient.SqlConnection)" />
- or
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.#ctor(Microsoft.Data.SqlClient.SqlConnection,Microsoft.Data.SqlClient.SqlBulkCopyOptions,Microsoft.Data.SqlClient.SqlTransaction)" />
- and
- <see cref="T:Microsoft.Data.SqlClient.SqlCredential" />
- to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string.
- </param><summary>
- Initializes and opens a new instance of
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- based on the supplied
- <paramref name="connectionString" />
- . The constructor uses the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- to initialize a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- class.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The connection is automatically closed at the end of the bulk copy operation.
- If `connectionString` is null, an <xref:System.ArgumentNullException> is thrown. If `connectionString` is an empty string, an <xref:System.ArgumentException> is thrown.
- ## Examples
- The following console application demonstrates how to bulk load data by using a connection specified as a string. The connection is automatically
- closed when the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instance is closed.
- In this example, the source data is first read from a SQL Server table to a <xref:Microsoft.Data.SqlClient.SqlDataReader> instance.
- The source data does not have to be located on SQL Server; you can use any data source that can be read to an <xref:System.Data.IDataReader> or loaded to a <xref:System.Data.DataTable>.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ConnectionString#1](~/../sqlclient/doc/samples/SqlBulkCopy_ConnectionString.cs#1)]
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">
- If `connectionString` is an empty string, an
- <see cref="T:System.ArgumentException" />
- is thrown.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.#ctor(System.String,Microsoft.Data.SqlClient.SqlBulkCopyOptions)">
- <param name="connectionString">
- The string defining the connection that will be opened for use by the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- instance. If your connection string does not use
- <see langword="Integrated Security = true" />
- , you can use
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.#ctor(Microsoft.Data.SqlClient.SqlConnection)" />
- or
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.#ctor(Microsoft.Data.SqlClient.SqlConnection,Microsoft.Data.SqlClient.SqlBulkCopyOptions,Microsoft.Data.SqlClient.SqlTransaction)" />
- and
- <see cref="T:Microsoft.Data.SqlClient.SqlCredential" />
- to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string.
- </param><param name="copyOptions">
- A combination of values from the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyOptions" />
- enumeration that determines which data source rows are copied to the destination table.
- </param><summary>
- Initializes and opens a new instance of
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- based on the supplied
- <paramref name="connectionString" />
- . The constructor uses that
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- to initialize a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- class. The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- instance behaves according to options supplied in the
- <paramref name="copyOptions" />
- parameter.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## remarks
- You can obtain detailed information about all the bulk copy options in the <xref:Microsoft.Data.SqlClient.SqlBulkCopyOptions> topic.
- ## Examples
- The following console application demonstrates how to perform a bulk load by using a connection specified as a string.
- An option is set to use the value in the identity column of the source table when you load the destination table. In this example,
- the source data is first read from a SQL Server table to a <xref:Microsoft.Data.SqlClient.SqlDataReader> instance.
- The source table and destination table each include an Identity column. By default, a new value for the **Identity** column is generated in the destination table for each row added.
- In this example, an option is set when the connection is opened that forces the bulk load process to use the **Identity** values from the source table instead.
- To see how the option changes the way the bulk load works, run the sample with the **dbo.BulkCopyDemoMatchingColumns** table empty. All rows load from the source.
- Then run the sample again without emptying the table. An exception is thrown and the code writes a message to the console notifying you that rows weren't
- added because of primary key constraint violations.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md). This code is provided to
- demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement
- to copy the data.
- [!code-csharp[SqlBulkCopy.KeepIdentity#1](~/../sqlclient/doc/samples/SqlBulkCopy_KeepIdentity.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopy.BatchSize">
- <summary>
- Number of rows in each batch. At the end of each batch, the rows in the batch are sent to the server.
- </summary><value>
- The integer value of the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.BatchSize" />
- property, or zero if no value has been set.
- </value><remarks>
- <format type="text/markdown"><.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.BatchSize#1](~/../sqlclient/doc/samples/SqlBulkCopy_BatchSize.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopy.BulkCopyTimeout">
- <summary>
- Number of seconds for the operation to complete before it times out.
- </summary><value>
- The integer value of the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.BulkCopyTimeout" />
- property. The default is 30 seconds. A value of 0 indicates no limit; the bulk copy will wait indefinitely.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- If the operation does time out, the transaction is not committed and all copied rows are removed from the destination table.
- ## Examples
- The following console application demonstrates how to modify the time-out to 60 seconds when bulk loading data.
- In this example, the source data is first read from a SQL Server table to a <xref:Microsoft.Data.SqlClient.SqlDataReader> instance.
- The source data does not have to be located on SQL Server; you can use any data source that can be read to an <xref:System.Data.IDataReader> or loaded to a
- <xref:System.Data.DataTable>.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.Timeout#1](~/../sqlclient/doc/samples/SqlBulkCopy_Timeout.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopy.EnableStreaming">
- <summary>
- Enables or disables a
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object to stream data from an
- <see cref="T:System.Data.IDataReader" />
- object
- </summary><value>
- <see langword="true" />
- if a
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object can stream data from an
- <see cref="T:System.Data.IDataReader" />
- object; otherwise, false. The default is
- <see langword="false" />
- .
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- When <xref:Microsoft.Data.SqlClient.SqlBulkCopy.EnableStreaming> is `true`, <xref:Microsoft.Data.SqlClient.SqlBulkCopy> reads from an <xref:System.Data.IDataReader> object using <xref:System.Data.CommandBehavior.SequentialAccess>,
- optimizing memory usage by using the <xref:System.Data.IDataReader> streaming capabilities. When it's set to false, the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> class loads all the data returned by the
- <xref:System.Data.IDataReader> object into memory before sending it to SQL Server or SQL Azure.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings">
- <summary>
- Returns a collection of
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" />
- items. Column mappings define the relationships between columns in the data source and columns in the destination.
- </summary><value>
- A collection of column mappings. By default, it is an empty collection.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- If the data source and the destination table have the same number of columns, and the ordinal position of each source column within the data source matches the ordinal position of
- the corresponding destination column, the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings> collection is unnecessary. However, if the column counts differ,
- or the ordinal positions are not consistent, you must use <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings> to make sure that data is copied into the correct columns.
- During the execution of a bulk copy operation, this collection can be accessed, but it cannot be changed. Any attempt to change it will throw an <xref:System.InvalidOperationException>.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName">
- <summary>
- Name of the destination table on the server.
- </summary><value>
- The string value of the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property, or null if none as been supplied.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- If <xref:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName> has not been set when <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> is called, an <xref:System.ArgumentNullException>
- is thrown. If <xref:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName> is modified while a <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> operation is running,
- the change does not affect the current operation. The new <xref:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName> value is used the next time a <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method is called.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName> is a three-part name (`<database>.<owningschema>.<name>`). You can qualify the table name with its database and owning schema if you choose.
- However, if the table name uses an underscore ("_") or any other special characters, you must escape the name using surrounding brackets as in (`[<database>.<owningschema>.<name_01>]`).
- You can bulk-copy data to a temporary table by using a value such as `tempdb..#table` or `tempdb.<owner>.#table` for the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName> property.
- ## Examples
- The following console application demonstrates how to bulk load data using a connection that is already open. The destination table is a table in the **AdventureWorks** database.
- In this example, the connection is first used to read data from a SQL Server table to a <xref:Microsoft.Data.SqlClient.SqlDataReader> instance. The source data does not have to
- be located on SQL Server; you can use any data source that can be read to an <xref:System.Data.IDataReader> or loaded to a <xref:System.Data.DataTable>.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.Single#1](~/../sqlclient/doc/samples/SqlBulkCopy_Single.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopy.NotifyAfter">
- <summary>
- Defines the number of rows to be processed before generating a notification event.
- </summary><value>
- The integer value of the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.NotifyAfter" />
- property, or zero if the property has not been set.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- This property is designed for user interface components that illustrate the progress of a bulk copy operation. It indicates the number of rows to be processed before generating a notification event.
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.NotifyAfter> property can be set at any time, even while a bulk copy operation is underway. Changes made during a bulk copy operation take effect after
- the next notification. The new setting applies to all subsequent operations on the same instance.
- If <xref:Microsoft.Data.SqlClient.SqlBulkCopy.NotifyAfter> is set to a number less than zero, an <xref:System.ArgumentOutOfRangeException> is thrown.
- ## Examples
- The following console application demonstrates how to bulk load data using a connection that is already open. The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.NotifyAfter> property is set so that
- the event handler is called after every 50 rows copied to the table.
- In this example, the connection is first used to read data from a SQL Server table to a <xref:Microsoft.Data.SqlClient.SqlDataReader> instance. Then a second connection is opened to bulk copy the data.
- Note that the source data does not have to be located on SQL Server; you can use any data source that can be read to an <xref:System.Data.IDataReader> or loaded to a <xref:System.Data.DataTable>.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md). This code is provided to
- demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT`
- statement to copy the data.
- [!code-csharp[SqlBulkCopy.NotifyAfter#1](~/../sqlclient/doc/samples/SqlBulkCopy_NotifyAfter.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="E:Microsoft.Data.SqlClient.SqlBulkCopy.SqlRowsCopied">
- <summary>
- Occurs every time that the number of rows specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.NotifyAfter" />
- property have been processed.
- </summary><remarks>
- <format type="text/markdown">< for examples that use the
- <xref:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs.Abort> property.)
- No action, such as transaction activity, is supported in the connection during the execution of the bulk copy operation, and it is recommended that you not use the same connection used
- during the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.SqlRowsCopied> event. However, you can open a different connection.
- ## Examples
- The following console application demonstrates how to bulk load data using a connection that is already open. The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.NotifyAfter> property is set so that
- the event handler is called after every 50 rows copied to the table.
- In this example, the connection is first used to read data from a SQL Server table to a <xref:Microsoft.Data.SqlClient.SqlDataReader> instance. Note that the source data does not have to be located on
- SQL Server; you can use any data source that can be read to an <xref:System.Data.IDataReader> or loaded to a <xref:System.Data.DataTable>.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier
- and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.NotifyAfter#1](~/../sqlclient/doc/samples/SqlBulkCopy_NotifyAfter.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.Close">
- <summary>
- Closes the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" /> instance.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- After you call a <xref:Microsoft.Data.SqlClient.SqlBulkCopy.Close> on the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> object, no other operation will succeed. Calls to the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method will throw an <xref:System.InvalidOperationException>.
- Calling the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.Close> method from the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.SqlRowsCopied> event causes an <xref:System.InvalidOperationException> to be thrown.
- Note that open <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instances are closed implicitly at the end of a `using` block.
- ## Examples
- The following example uses the same <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instance to add sales orders and their associated details to two destination tables. Because the **AdventureWorks** sales order tables are large, the sample reads only orders placed by a certain account number and bulk copies those orders and details to the destination tables. The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.Close> method is used only after both bulk copy operations are complete.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.OrdersDetails#1](~/../sqlclient/doc/samples/SqlBulkCopy_OrdersDetails.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.System#IDisposable#Dispose">
- <summary>
- Releases all resources used by the current instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- class.
- </summary><remarks>
- <format type="text/markdown">< and
- [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).
- > [!NOTE]
- > Always call `Dispose` before you release your last reference to the <xref:Microsoft.Data.SqlClient.SqlBulkCopy>. Otherwise, the resources it is using will not be freed until the garbage collector calls
- the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> object's `Finalize` method.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.Common.DbDataReader)">
- <param name="reader">
- A
- <see cref="T:System.Data.Common.DbDataReader" />
- whose rows will be copied to the destination table.
- </param><summary>
- Copies all rows from the supplied
- <see cref="T:System.Data.Common.DbDataReader" />
- array to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable)">
- <param name="table">
- A
- <see cref="T:System.Data.DataTable" />
- whose rows will be copied to the destination table.
- </param><summary>
- Copies all rows in the supplied
- <see cref="T:System.Data.DataTable" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- All rows in the <xref:System.Data.DataTable> are copied to the destination table except those that have been deleted.
- While the bulk copy operation is in progress, the associated destination <xref:Microsoft.Data.SqlClient.SqlConnection> is busy serving it, and no other operations can be performed on the connection.
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings> collection maps from the <xref:System.Data.DataTable> columns to the destination database table.
- ## Examples
- The following Console application demonstrates how to bulk load data from a <xref:System.Data.DataTable>. The destination table is a table in the **AdventureWorks** database.
- In this example, a <xref:System.Data.DataTable> is created at run time and is the source of the `SqlBulkCopy` operation.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.DataTable#1](~/../sqlclient/doc/samples/SqlBulkCopy_DataTable.cs#1)]
- ]]></format>
- </remarks><related type="Article" href="https://msdn.microsoft.com/library/83a7a0d2-8018-4354-97b9-0b1d99f8342b">
- Performing Bulk Copy Operations
- </related><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">
- ADO.NET Overview
- </related>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable,System.Data.DataRowState)">
- <param name="table">
- A
- <see cref="T:System.Data.DataTable" />
- whose rows will be copied to the destination table.
- </param><param name="rowState">
- A value from the
- <see cref="T:System.Data.DataRowState" />
- enumeration. Only rows matching the row state are copied to the destination.
- </param><summary>
- Copies only rows that match the supplied row state in the supplied
- <see cref="T:System.Data.DataTable" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Only rows in the <xref:System.Data.DataTable> that are in the states indicated in the `rowState` argument and have not been deleted are copied to the destination table.
- > [!NOTE]
- > If <xref:System.Data.DataRowState.Deleted> is specified, any <xref:System.Data.DataRowState.Unchanged>, <xref:System.Data.DataRowState.Added>, and <xref:System.Data.DataRowState.Modified>
- rows will also be copied to the server. No exception will be raised.
- While the bulk copy operation is in progress, the associated destination <xref:Microsoft.Data.SqlClient.SqlConnection> is busy serving it, and no other operations can be performed on the connection.
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings> collection maps from the <xref:System.Data.DataTable> columns to the destination database table.
- ## Examples
- The following Console application demonstrates how to bulk load only the rows in a <xref:System.Data.DataTable> that match a specified state. In this case, only unchanged rows are added. The destination table is a table in the **AdventureWorks** database.
- In this example, a <xref:System.Data.DataTable> is created at run time and three rows are added to it. Before the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method is executed, one of the rows is edited.
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method is called with a `DataRowState.Unchanged` `rowState` argument, so only the two unchanged rows are bulk copied to the destination.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.DataRowState#1](~/../sqlclient/doc/samples/SqlBulkCopy_DataRowState.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataRow[])">
- <param name="rows">An array of <see cref="T:System.Data.DataRow" /> objects that will be copied to the destination table.</param><summary>Copies all rows from the supplied <see cref="T:System.Data.DataRow" /> array to a destination table specified by the <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" /> property of the <see cref="T:System.Data.SqlClient.SqlBulkCopy" /> object.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- While the bulk copy operation is in progress, the associated destination <xref:Microsoft.Data.SqlClient.SqlConnection> is busy serving it, and no other operations can be performed on the connection.
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings> collection maps from the <xref:System.Data.DataRow> columns to the destination database table.
- ## Examples
- The following console application demonstrates how to bulk load data from a <xref:System.Data.DataRow> array. The destination table is a table in the **AdventureWorks** database.
- In this example, a <xref:System.Data.DataTable> is created at run time. A single row is selected from the <xref:System.Data.DataTable> to copy to the destination table.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.RowArray#1](~/../sqlclient/doc/samples/SqlBulkCopy_RowArray.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.IDataReader)">
- <param name="reader">
- A
- <see cref="T:System.Data.IDataReader" />
- whose rows will be copied to the destination table.
- </param><summary>
- Copies all rows in the supplied
- <see cref="T:System.Data.IDataReader" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The copy operation starts at the next available row in the reader. Most of the time, the reader was just returned by <xref:System.Data.IDbCommand.ExecuteReader> or a similar call,
- so the next available row is the first row. To process multiple results, call <xref:System.Data.IDataReader.NextResult> on the data reader and call
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> again.
- Note that using <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> modifies the state of the reader. The method will call <xref:System.Data.IDataReader.Read>
- until it returns false, the operation is aborted, or an error occurs. This means that the data reader will be in a different state, probably at the end of the result set,
- when the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> operation is complete.
- While the bulk copy operation is in progress, the associated destination <xref:Microsoft.Data.SqlClient.SqlConnection> is busy serving it, and no other operations can be performed on the connection.
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings> collection maps from the data reader columns to the destination database table.
- ## Examples
- The following console application demonstrates how to bulk load data from a <xref:Microsoft.Data.SqlClient.SqlDataReader>. The destination table is a table in the **AdventureWorks** database.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md). This code is provided
- to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ConnectionString#1](~/../sqlclient/doc/samples/SqlBulkCopy_ConnectionString.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.Common.DbDataReader)">
- <param name="reader">
- A
- <see cref="T:System.Data.IDataReader" />
- whose rows will be copied to the destination table.
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.IDataReader)" />
- , which copies all rows in the supplied
- <see cref="T:System.Data.IDataReader" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- multiple times for the same instance before task completion. Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.IDataReader)" />
- for the same instance before task completion.
- The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- execution.
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution.
- Returned in the task object, there was a connection pool timeout.
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
- The
- <see cref="T:System.Data.IDataReader" />
- was closed before the completed
- <see cref="T:System.Threading.Tasks.Task" />
- returned.
- The
- <see cref="T:System.Data.IDataReader" />
- 's associated connection was closed before the completed
- <see cref="T:System.Threading.Tasks.Task" />
- returned.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.Common.DbDataReader,System.Threading.CancellationToken)">
- <param name="reader">
- A
- <see cref="T:System.Data.Common.DbDataReader" />
- whose rows will be copied to the destination table.
- </param><param name="cancellationToken">
- The cancellation instruction. A
- <see cref="P:System.Threading.CancellationToken.None" />
- value in this parameter makes this method equivalent to
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.Common.DbDataReader)" />
- .
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.Common.DbDataReader)" />
- , which copies all rows from the supplied
- <see cref="T:System.Data.Common.DbDataReader" />
- array to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><returns>
- Returns
- <see cref="T:System.Threading.Tasks.Task" />
- .
- </returns><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataRow[])">
- <param name="rows">
- An array of
- <see cref="T:System.Data.DataRow" />
- objects that will be copied to the destination table.
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataRow[])" />
- ,
- which copies all rows from the supplied
- <see cref="T:System.Data.DataRow" />
- array to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataRow[])" />
- multiple times for the same instance before task completion. Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataRow[])" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataRow[])" />
- for the same instance before task completion.
-
- The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataRow[])" />
- execution.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution.
-
- Returned in the task object, there was a connection pool timeout.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataRow[],System.Threading.CancellationToken)">
- <param name="rows">
- An array of
- <see cref="T:System.Data.DataRow" />
- objects that will be copied to the destination table.
- </param><param name="cancellationToken">
- The cancellation instruction. A
- <see cref="P:System.Threading.CancellationToken.None" />
- value in this parameter makes this method equivalent to
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- .
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataRow[])" />
- , which copies all rows from the supplied
- <see cref="T:System.Data.DataRow" />
- array to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataRow[])" />
- multiple times for the same instance before
- task completion. Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataRow[])" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataRow[])" />
- for the same instance before task completion. The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataRow[])" />
- execution. Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)">
- <param name="table">
- A
- <see cref="T:System.Data.DataTable" />
- whose rows will be copied to the destination table.
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable)" />
- , which copies all rows in the supplied
- <see cref="T:System.Data.DataTable" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- multiple times for the same instance before task completion.
-
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable)" />
- for the same instance before task completion.
-
- The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- execution.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution.
-
- Returned in the task object, there was a connection pool timeout.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Data.DataRowState)">
- <param name="table">
- A
- <see cref="T:System.Data.DataTable" />
- whose rows will be copied to the destination table.
- </param><param name="rowState">
- A value from the
- <see cref="T:System.Data.DataRowState" />
- enumeration. Only rows matching the row state are copied to the destination.
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable,System.Data.DataRowState)" />
- ,
- which copies only rows that match the supplied row state in the supplied
- <see cref="T:System.Data.DataTable" /> to a destination table specified by the <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" /> object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Data.DataRowState)" />
- multiple times for the same instance before task completion.
-
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Data.DataRowState)" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable,System.Data.DataRowState)" />
- for the same instance before task completion.
-
- The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Data.DataRowState)" />
- execution.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution.
-
- Returned in the task object, there was a connection pool timeout.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Data.DataRowState,System.Threading.CancellationToken)">
- <param name="table">
- A
- <see cref="T:System.Data.DataTable" />
- whose rows will be copied to the destination table.
- </param><param name="rowState">
- A value from the
- <see cref="T:System.Data.DataRowState" />
- enumeration. Only rows matching the row state are copied to the destination.
- </param><param name="cancellationToken">
- The cancellation instruction. A
- <see cref="P:System.Threading.CancellationToken.None" />
- value in this parameter makes this method equivalent to
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- .
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable,System.Data.DataRowState)" />
- ,
- which copies only rows that match the supplied row state in the supplied
- <see cref="T:System.Data.DataTable" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.\
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Data.DataRowState)" />
- multiple times for the same instance before task completion.
-
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Data.DataRowState)" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable,System.Data.DataRowState)" />
- for the same instance before task completion.
-
- The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Data.DataRowState)" />
- execution.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution.
-
- Returned in the task object, there was a connection pool timeout.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable,System.Threading.CancellationToken)">
- <param name="table">
- A
- <see cref="T:System.Data.DataTable" />
- whose rows will be copied to the destination table.
- </param><param name="cancellationToken">
- The cancellation instruction. A
- <see cref="P:System.Threading.CancellationToken.None" />
- value in this parameter makes this method equivalent to
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- .
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable)" />
- , which copies all rows in the supplied
- <see cref="T:System.Data.DataTable" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- multiple times for the same instance before task completion.
-
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.DataTable)" />
- for the same instance before task completion.
-
- The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- execution.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution.
-
- Returned in the task object, there was a connection pool timeout.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)">
- <param name="reader">
- A
- <see cref="T:System.Data.IDataReader" />
- whose rows will be copied to the destination table.
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.IDataReader)" />
- , which copies all rows in the supplied
- <see cref="T:System.Data.IDataReader" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- multiple times for the same
- instance before task completion.
-
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.IDataReader)" />
- for the same instance before task completion.
-
- The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- execution.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution.
-
- Returned in the task object, there was a connection pool timeout.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
-
- The
- <see cref="T:System.Data.IDataReader" />
- was closed before the completed
- <see cref="T:System.Threading.Tasks.Task" />
- returned.
-
- The
- <see cref="T:System.Data.IDataReader" />
- 's associated connection was closed before the completed
- <see cref="T:System.Threading.Tasks.Task" />
- returned.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader,System.Threading.CancellationToken)">
- <param name="reader">
- A
- <see cref="T:System.Data.IDataReader" />
- whose rows will be copied to the destination table.
- </param><param name="cancellationToken">
- The cancellation instruction. A
- <see cref="P:System.Threading.CancellationToken.None" />
- value in this parameter makes this method equivalent to
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.DataTable)" />
- .
- </param><summary>
- The asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.IDataReader)" />
- , which copies all rows in the supplied
- <see cref="T:System.Data.IDataReader" />
- to a destination table specified by the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopy.DestinationTableName" />
- property of the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object.
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- multiple times for the same instance before task completion.
-
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- and
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(System.Data.IDataReader)" />
- for the same instance before task completion.
-
- The connection drops or is closed during
- <see cref="M:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerAsync(System.Data.IDataReader)" />
- execution.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- object was closed during the method execution.
-
- Returned in the task object, there was a connection pool timeout.
-
- Returned in the task object, the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- object is closed before method execution.
-
- The
- <see cref="T:System.Data.IDataReader" />
- was closed before the completed
- <see cref="T:System.Threading.Tasks.Task" />
- returned.
-
- The
- <see cref="T:System.Data.IDataReader" />
- 's associated connection was closed before the completed
- <see cref="T:System.Threading.Tasks.Task" />
- returned.
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
- </exception>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping">
- <summary>
- Defines the mapping between a column in a
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />
- instance's data source and a column in the instance's destination table.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Column mappings define the mapping between data source and the target table.
- If mappings are not defined - that is, the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings%2A> collection is empty - the columns are mapped implicitly based on ordinal position.
- For this to work, source and target schemas must match. If they do not, an <xref:System.InvalidOperationException> will be thrown.
- If the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings%2A> collection is not empty, not every column present in the data source has to be specified. Those not mapped by the collection
- are ignored.
- You can refer to source and target columns by either name or ordinal. You can also mix by-name and by-ordinal column references in the same mappings collection.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the
- destination matches the number of columns in the source, and each destination column is in the same ordinal position as its corresponding source column, the column names do not match.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMapping#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMapping.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.#ctor">
- <summary>
- Parameterless constructor that initializes a new
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" />
- object.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- If you use this constructor, you must then define the source for the mapping using the <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceColumn>
- property or the <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceOrdinal%2A> property, and define the destination for the mapping using the
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationColumn%2A> property or the <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationOrdinal%2A> property.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database.
- Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMapping#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMapping.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.#ctor(System.Int32,System.Int32)">
- <param name="sourceColumnOrdinal">
- The ordinal position of the source column within the data source.
- </param><param name="destinationOrdinal">
- The ordinal position of the destination column within the destination table.
- </param><summary>
- Creates a new column mapping, using column ordinals to refer to source and destination columns.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database.
- Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a column map for the bulk copy based on the ordinal positions of the columns.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier
- and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingOrdinal.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.#ctor(System.Int32,System.String)">
- <param name="sourceColumnOrdinal">
- The ordinal position of the source column within the data source.
- </param><param name="destinationColumn">
- The name of the destination column within the destination table.
- </param><summary>
- Creates a new column mapping, using a column ordinal to refer to the source column and a column name for the target column.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in
- the destination matches the number of columns in the source, the column names and ordinal positions do not match. <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a
- column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and
- faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingOrdinalName#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingOrdinalName.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.#ctor(System.String,System.Int32)">
- <param name="sourceColumn">
- The name of the source column within the data source.
- </param><param name="destinationOrdinal">
- The ordinal position of the destination column within the destination table.
- </param><summary>
- Creates a new column mapping, using a column name to refer to the source column and a column ordinal for the target column.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in
- the destination matches the number of columns in the source, the column names and ordinal positions do not match. <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create
- a column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md). This code is
- provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to
- use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingNameOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingNameOrdinal.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.#ctor(System.String,System.String)">
- <param name="sourceColumn">
- The name of the source column within the data source.
- </param><param name="destinationColumn">
- The name of the destination column within the destination table.
- </param><summary>
- Creates a new column mapping, using column names to refer to source and destination columns.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the
- destination matches the number of columns in the source, the column names and ordinal positions do not match. <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a
- column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMapping#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMapping.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationColumn">
- <summary>
- Name of the column being mapped in the destination database table.
- </summary><value>
- The string value of the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationColumn" />
- property.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationColumn%2A> and <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationOrdinal%2A> properties are mutually exclusive.
- The last value set takes precedence.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database.
- Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingDestinationColumn#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingDestinationColumn.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationOrdinal">
- <summary>
- Ordinal value of the destination column within the destination table.
- </summary><value>
- The integer value of the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationOrdinal" />
- property, or -1 if the property has not been set.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationColumn%2A> and <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.DestinationOrdinal%2A> properties are mutually exclusive.
- The last value set takes precedence.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the
- destination matches the number of columns in the source, the column names and ordinal positions do not match. <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a
- column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingDestinationOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingDestinationOrdinal.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceColumn">
- <summary>
- Name of the column being mapped in the data source.
- </summary><value>
- The string value of the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceColumn" />
- property.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceColumn%2A> and <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceOrdinal%2A> properties are mutually exclusive.
- The last value set takes precedence.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the
- destination matches the number of columns in the source, the column names and ordinal positions do not match. <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a
- column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingDestinationColumn#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingDestinationColumn.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceOrdinal">
- <summary>
- The ordinal position of the source column within the data source.
- </summary><value>
- The integer value of the
- <see cref="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceOrdinal" />
- property.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceColumn%2A> and <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping.SourceOrdinal%2A> properties are mutually exclusive.
- The last value set takes precedence.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination
- matches the number of columns in the source, the column names and ordinal positions do not match. <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a column map for the
- bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingDestinationOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingDestinationOrdinal.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection">
- <summary>Collection of <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> objects that inherits from <see cref="T:System.Collections.CollectionBase" />.</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Column mappings define the mapping between data source and the target table.
- If mappings are not defined - that is, the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings%2A> collection is empty - the columns are mapped implicitly based on ordinal position.
- For this to work, source and target schemas must match. If they do not, an <xref:System.InvalidOperationException> is thrown.
- If the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.ColumnMappings%2A> collection is not empty, not every column present in the data source has to be specified. Those not mapped by the collection are
- ignored.
- You can refer to source and target columns by either name or ordinal. You can mix by-name and by-ordinal column references in the same mappings collection.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database.
- Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> are added to the <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection> for the
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy> object to create a column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to
- use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingCollection#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingCollection.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Item(System.Int32)">
- <param name="index">The zero-based index of the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> to find.</param><summary>Gets the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object at the specified index.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object.</value><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Add(Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping)">
- <param name="bulkCopyColumnMapping">The <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object that describes the mapping to be added to the collection.</param><summary>Adds the specified mapping to the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection" />.</summary><returns>A <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object.</returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database.
- Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMapping#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMapping.cs)]
- ]]>
- </format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Add(System.Int32,System.Int32)">
- <param name="sourceColumnIndex">The ordinal position of the source column within the data source.</param><param name="destinationColumnIndex">The ordinal position of the destination column within the destination table.</param><summary>Creates a new <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> and adds it to the collection, using ordinals to specify both source and destination columns.</summary><returns>A column mapping.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Mappings in a collection must be uniform: either all integer/integer pairs, all string/string pairs, all integer/string pairs, or all string/integer pairs. If you try to add a
- mapping that is different from others already in the collection, an <xref:System.InvalidOperationException> is thrown.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database.
- Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a column map for the bulk copy using the ordinal position of the source and destination columns.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingCollectionOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingCollectionOrdinal.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Add(System.Int32,System.String)">
- <param name="sourceColumnIndex">The ordinal position of the source column within the data source.</param><param name="destinationColumn">The name of the destination column within the destination table.</param><summary>Creates a new <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> and adds it to the collection, using an ordinal for the source column and a string for the destination column.</summary><returns>A column mapping.</returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Mappings in a collection must be uniform: either all integer/integer pairs, all string/string pairs, all integer/string pairs, or all string/integer pairs.
- If you try to add a mapping that is different from others already in the collection, an <xref:System.InvalidOperationException> is thrown.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the
- destination matches the number of columns in the source, the column names and ordinal positions do not match. <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a
- column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy_ColumnMappingIndexColName#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingIndexColName.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Add(System.String,System.Int32)">
- <param name="sourceColumn">The name of the source column within the data source.</param><param name="destinationColumnIndex">The ordinal position of the destination column within the destination table.</param><summary>Creates a new <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> and adds it to the collection, using a column name to describe the source column and an ordinal to specify the destination column.</summary><returns>A column mapping.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Mappings in a collection must be uniform: either all integer/integer pairs, all string/string pairs, all integer/string pairs, or all string/integer pairs.
- If you try to add a mapping that is different from others already in the collection, an <xref:System.InvalidOperationException> is thrown.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database.
- Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match.
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> objects are used to create a column map for the bulk copy.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingColNameIndex#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingColNameIndex.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Add(System.String,System.String)">
- <param name="sourceColumn">The name of the source column within the data source.</param><param name="destinationColumn">The name of the destination column within the destination table.</param><summary>Creates a new <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> and adds it to the collection, using column names to specify both source and destination columns.</summary><returns>A column mapping.</returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Mappings in a collection must be uniform: either all integer/integer pairs, all string/string pairs, all integer/string pairs, or all string/integer pairs.
- If you try to add a mapping that is different from others already in the collection, an <xref:System.InvalidOperationException> is thrown.
- ## Examples
- The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database.
- Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. The code creates a
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping> object by specifying the column names.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingCollection#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingCollection.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Clear">
- <summary>Clears the contents of the collection.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Clear%2A> method is most commonly used when you use a single <xref:Microsoft.Data.SqlClient.SqlBulkCopy>
- instance to process more than one bulk copy operation. If you create column mappings for one bulk copy operation, you must clear the
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection> after the <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method and before processing the next bulk copy.
- Performing several bulk copies using the same <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instance will usually be more efficient from a performance point of view than using a separate
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy> for each operation.
- ## Examples
- The following example performs two bulk copy operations. The first operation copies sales order header information, and the second copies sales order details.
- Although not strictly necessary in this example (because the ordinal positions of the source and destination columns do match), the example defines column mappings for each bulk copy operation.
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Clear%2A> method must be used after the first bulk copy is performed and before the next bulk copy's column mappings are defined.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingOrdersDetails#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingOrdersDetails.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Contains(Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping)">
- <param name="value">A valid <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object.</param><summary>Gets a value indicating whether a specified <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object exists in the collection.</summary><returns>
- <see langword="true" /> if the specified mapping exists in the collection; otherwise <see langword="false" />.</returns>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.CopyTo(Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping[],System.Int32)">
- <param name="array">The one-dimensional <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> array that is the destination of the elements copied from
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection" />. The array must have zero-based indexing.</param><param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param><summary>Copies the elements of the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection" /> to an array of <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" />
- items, starting at a particular index.
- </summary>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.IndexOf(Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping)">
- <param name="value">The <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object for which to search.</param><summary>Gets the index of the specified <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object.</summary><returns>The zero-based index of the column mapping, or -1 if the column mapping is not found in the collection.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Insert(System.Int32,Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping)">
- <param name="index">Integer value of the location within the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection" /> at which to insert the new
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" />.</param><param name="value">
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object to be inserted in the collection.</param><summary>Insert a new <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> at the index specified.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Remove(Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping)">
- <param name="value">
- <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object to be removed from the collection.</param><summary>Removes the specified <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> element from the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection" />.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Remove%2A> method is most commonly used when you use a single <xref:Microsoft.Data.SqlClient.SqlBulkCopy>
- instance to process more than one bulk copy operation. If you create column mappings for one bulk copy operation, you must remove mappings that no longer apply after the
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method is called and before defining mapping for the next bulk copy. You can clear the entire collection by using the
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Clear%2A> method, or remove mappings individually using the <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Remove%2A>
- method or the <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.RemoveAt%2A> method.
- Performing several bulk copies using the same <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instance will usually be more efficient from a performance point of view than using a separate
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy> for each operation.
- ## Examples
- The following example performs two bulk copy operations. The first operation copies sales order header information, and the second copies sales order details.
- Although not strictly necessary in this example (because the ordinal positions of the source and destination columns do match), the example defines column mappings for each bulk copy operation.
- Both bulk copies include a mapping for the **SalesOrderID**, so rather than clearing the entire collection between bulk copy operations, the example removes all mappings except for the **SalesOrderID**
- mapping and then adds the appropriate mappings for the second bulk copy operation.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingRemove#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingRemove.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.RemoveAt(System.Int32)">
- <param name="index">The zero-based index of the <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnMapping" /> object to be removed from the collection.</param><summary>Removes the mapping at the specified index from the collection.</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.RemoveAt%2A> method is most commonly used when you use a single <xref:Microsoft.Data.SqlClient.SqlBulkCopy>
- instance to process more than one bulk copy operation. If you create column mappings for one bulk copy operation, you must remove mappings that no longer apply after the
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method is called and before defining mapping for the next bulk copy. You can clear the entire collection by using the
- <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Clear%2A> method, or remove mappings individually using the <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Remove%2A>
- method or the <xref:Microsoft.Data.SqlClient.SqlBulkCopyColumnMappingCollection.RemoveAt%2A> method.
- Performing several bulk copies using the same <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instance will usually be more efficient from a performance point of view than using a separate
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy> for each operation.
- ## Examples
- The following example performs two bulk copy operations. The first operation copies sales order header information, and the second copies sales order details.
- Although not strictly necessary in this example (because the ordinal positions of the source and destination columns do match), the example defines column mappings for each bulk copy operation.
- Both bulk copies include a mapping for the **SalesOrderID**, so rather than clearing the entire collection between bulk copy operations, the example removes all mappings except for the
- **SalesOrderID** mapping and then adds the appropriate mappings for the second bulk copy operation.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a
- Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.ColumnMappingRemoveAt#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingRemoveAt.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlBulkCopyOptions">
- <summary>Bitwise flag that specifies one or more options to use with an instance of <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- You can use the <xref:Microsoft.Data.SqlClient.SqlBulkCopyOptions> enumeration when you construct a <xref:Microsoft.Data.SqlClient.SqlBulkCopy> instance to change how the
- <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> methods for that instance behave.
- ## Examples
- The following console application demonstrates how to perform a bulk load that copies the value in the identity column of the source table to the corresponding column in the destination table,
- instead of generating a new value for each row's identity column.
- To see how the option changes the way the bulk load works, run the sample with the **dbo.BulkCopyDemoMatchingColumns** table empty. All rows load from the source.
- Next, run the sample again without emptying the table. An exception is thrown, and the code writes a message to the console window notifying you that rows were not added because of
- primary key violations.
- > [!IMPORTANT]
- > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](~/docs/framework/data/adonet/sql/bulk-copy-example-setup.md).
- This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance,
- it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data.
- [!code-csharp[SqlBulkCopy.KeepIdentity#1](~/../sqlclient/doc/samples/SqlBulkCopy_KeepIdentity.cs)]
- ]]></format>
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlBulkCopyOptions.AllowEncryptedValueModifications">
- <summary>
- <format type="text/markdown"><![CDATA[
- When specified, **AllowEncryptedValueModifications** enables bulk copying of encrypted data between tables or databases, without decrypting the data. Typically,
- an application would select data from encrypted columns from one table without decrypting the data (the app would connect to the database with the column encryption setting keyword set
- to disabled) and then would use this option to bulk insert the data, which is still encrypted.
- Use caution when specifying **AllowEncryptedValueModifications** as this may lead to corrupting the database because the driver does not check if the data is indeed encrypted,
- or if it is correctly encrypted using the same encryption type, algorithm and key as the target column.
- ]]></format>
- </summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlBulkCopyOptions.CheckConstraints">
- <summary>Check constraints while data is being inserted. By default, constraints are not checked.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlBulkCopyOptions.Default">
- <summary>Use the default values for all options.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlBulkCopyOptions.FireTriggers">
- <summary>When specified, cause the server to fire the insert triggers for the rows being inserted into the database.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlBulkCopyOptions.KeepIdentity">
- <summary>Preserve source identity values. When not specified, identity values are assigned by the destination.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlBulkCopyOptions.KeepNulls">
- <summary>Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlBulkCopyOptions.TableLock">
- <summary>Obtain a bulk update lock for the duration of the bulk copy operation. When not specified, row locks are used.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlBulkCopyOptions.UseInternalTransaction">
- <summary>When specified, each batch of the bulk-copy operation will occur within a transaction. If you indicate this option and also provide a <see cref="T:Microsoft.Data.SqlClient.SqlTransaction" />
- object to the constructor, an <see cref="T:System.ArgumentException" /> occurs.
- </summary>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlClientFactory">
- <summary>
- Represents a set of methods for creating instances of the
- <see cref="N:Microsoft.Data.SqlClient" />
- provider's implementation of the data source classes.
- </summary><remarks>
- To be added.
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientFactory.Instance">
- <summary>
- Gets an instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlClientFactory" />
- . This can be used to retrieve strongly typed data objects.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following code fragment uses the <xref:Microsoft.Data.SqlClient.SqlClientFactory.Instance> property to retrieve a **SqlClientFactory** instance, and then return a strongly typed
- <xref:System.Data.Common.DbCommand> instance:
- ```csharp
- SqlClientFactory newFactory = SqlClientFactory.Instance;
- DbCommand cmd = newFactory.CreateCommand();
- ```
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlClientFactory.CreateCommand">
- <summary>
- Returns a strongly typed
- <see cref="T:System.Data.Common.DbCommand" />
- instance.
- </summary><returns>
- A new strongly typed instance of
- <see cref="T:System.Data.Common.DbCommand" />
- .
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following code fragment returns a strongly typed <xref:System.Data.Common.DbCommand> instance:
- ```csharp
- SqlClientFactory newFactory = SqlClientFactory.Instance;
- DbCommand cmd = newFactory.CreateCommand();
- ```
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlClientFactory.CreateCommandBuilder">
- <summary>
- Returns a strongly typed
- <see cref="T:System.Data.Common.DbCommandBuilder" />
- instance.
- </summary><returns>
- A new strongly typed instance of
- <see cref="T:System.Data.Common.DbCommandBuilder" />
- .
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following code fragment returns a strongly typed <xref:System.Data.Common.DbCommandBuilder> instance:
- ```csharp
- SqlClientFactory newFactory = SqlClientFactory.Instance;
- DbCommandBuilder cmd = newFactory.CreateCommandBuilder();
- ```
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlClientFactory.CreateConnection">
- <summary>
- Returns a strongly typed
- <see cref="T:System.Data.Common.DbConnection" />
- instance.
- </summary><returns>
- A new strongly typed instance of
- <see cref="T:System.Data.Common.DbConnection" />
- .
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Examples
- The following code fragment returns a strongly typed <xref:System.Data.Common.DbConnection> instance:
- ```csharp
- SqlClientFactory newFactory = SqlClientFactory.Instance;
- DbConnection cmd = newFactory.CreateConnection();
- ```
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlClientFactory.CreateConnectionStringBuilder">
- <summary>
- Returns a strongly typed
- <see cref="T:System.Data.Common.DbConnectionStringBuilder" />
- instance.
- </summary><returns>
- A new strongly typed instance of
- <see cref="T:System.Data.Common.DbConnectionStringBuilder" />
- .
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Examples
- The following code fragment returns a strongly typed <xref:System.Data.Common.DbConnectionStringBuilder> instance:
- ```csharp
- SqlClientFactory newFactory = SqlClientFactory.Instance;
- DbConnectionStringBuilder cmd =
- newFactory.CreateConnectionStringBuilder();
- ```
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlClientFactory.CreateDataAdapter">
- <summary>
- Returns a strongly typed
- <see cref="T:System.Data.Common.DbDataAdapter" />
- instance.
- </summary><returns>
- A new strongly typed instance of
- <see cref="T:System.Data.Common.DbDataAdapter" />
- .
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Examples
- The following code fragment returns a strongly typed <xref:System.Data.Common.DbDataAdapter> instance:
- ```csharp
- SqlClientFactory newFactory = SqlClientFactory.Instance;
- DbDataAdapter cmd = newFactory.CreateDataAdapter();
- ```
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlClientFactory.CreateParameter">
- <summary>
- Returns a strongly typed
- <see cref="T:System.Data.Common.DbParameter" />
- instance.
- </summary><returns>
- A new strongly typed instance of
- <see cref="T:System.Data.Common.DbParameter" />
- .
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Examples
- The following code fragment returns a strongly typed <xref:System.Data.Common.DbParameter> instance:
- ```csharp
- SqlClientFactory newFactory = SqlClientFactory.Instance;
- DbParameter cmd = newFactory.CreateParameter();
- ```
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames">
- <summary>Provides a list of constants for use with the **GetSchema** method to retrieve metadata collections.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.Columns">
- <summary>A constant for use with the **GetSchema** method that represents the **Columns** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.Databases">
- <summary>A constant for use with the **GetSchema** method that represents the **Databases** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.ForeignKeys">
- <summary>A constant for use with the **GetSchema** method that represents the **ForeignKeys** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.IndexColumns">
- <summary>A constant for use with the **GetSchema** method that represents the **IndexColumns** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.Indexes">
- <summary>A constant for use with the **GetSchema** method that represents the **Indexes** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.Parameters">
- <summary>A constant for use with the **GetSchema** method that represents the **Parameters** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.ProcedureColumns">
- <summary>A constant for use with the **GetSchema** method that represents the **ProcedureColumns** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.Procedures">
- <summary>A constant for use with the **GetSchema** method that represents the **Procedures** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.Tables">
- <summary>A constant for use with the **GetSchema** method that represents the **Tables** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.UserDefinedTypes">
- <summary>A constant for use with the **GetSchema** method that represents the **UserDefinedTypes** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.Users">
- <summary>A constant for use with the **GetSchema** method that represents the **Users** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.ViewColumns">
- <summary>A constant for use with the **GetSchema** method that represents the **ViewColumns** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlClientMetaDataCollectionNames.Views">
- <summary>A constant for use with the **GetSchema** method that represents the **Views** collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlCommand">
- <summary>
- Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database. This class cannot be inherited.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- When an instance of <xref:Microsoft.Data.SqlClient.SqlCommand> is created, the read/write properties are set to their initial values. For a list of these values, see the <xref:Microsoft.Data.SqlClient.SqlCommand> constructor.
- <xref:Microsoft.Data.SqlClient.SqlCommand> features the following methods for executing commands at a SQL Server database:
- |Item|Description|
- |----------|-----------------|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery%2A>|Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <xref:Microsoft.Data.SqlClient.SqlCommand>, generally executing commands such as INSERT, DELETE, UPDATE, and SET statements. Each call to <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery%2A> must be paired with a call to <xref:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery%2A> which finishes the operation, typically on a separate thread.|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A>|Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <xref:Microsoft.Data.SqlClient.SqlCommand> and retrieves one or more results sets from the server. Each call to <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A> must be paired with a call to <xref:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader%2A> which finishes the operation, typically on a separate thread.|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader%2A>|Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <xref:Microsoft.Data.SqlClient.SqlCommand>. Each call to `BeginExecuteXmlReader` must be paired with a call to `EndExecuteXmlReader`, which finishes the operation, typically on a separate thread, and returns an <xref:System.Xml.XmlReader> object.|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A>|Executes commands that return rows. For increased performance, <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A> invokes commands using the Transact-SQL `sp_executesql` system stored procedure. Therefore, <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A> might not have the effect that you want if used to execute commands such as Transact-SQL SET statements.|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery%2A>|Executes commands such as Transact-SQL INSERT, DELETE, UPDATE, and SET statements.|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalar%2A>|Retrieves a single value (for example, an aggregate value) from a database.|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReader%2A>|Sends the <xref:Microsoft.Data.SqlClient.SqlCommand.CommandText%2A> to the <xref:Microsoft.Data.SqlClient.SqlCommand.Connection%2A> and builds an <xref:System.Xml.XmlReader> object.|
- You can reset the <xref:Microsoft.Data.SqlClient.SqlCommand.CommandText%2A> property and reuse the <xref:Microsoft.Data.SqlClient.SqlCommand> object. However, you must close the <xref:Microsoft.Data.SqlClient.SqlDataReader> before you can execute a new or previous command.
- If a <xref:Microsoft.Data.SqlClient.SqlException> is generated by the method executing a <xref:Microsoft.Data.SqlClient.SqlCommand>, the <xref:Microsoft.Data.SqlClient.SqlConnection> remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the <xref:Microsoft.Data.SqlClient.SqlConnection>. However, the user can reopen the connection and continue.
- > [!NOTE]
- > Nameless, also called ordinal, parameters are not supported by the .NET Framework Data Provider for SQL Server.
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection>, a <xref:Microsoft.Data.SqlClient.SqlCommand>, and a <xref:Microsoft.Data.SqlClient.SqlDataReader>. The example reads through the data, writing it to the console. Finally, the example closes the <xref:Microsoft.Data.SqlClient.SqlDataReader> and then the <xref:Microsoft.Data.SqlClient.SqlConnection> as it exits the `Using` code blocks.
- [!code-csharp[SqlCommand Example#1](~/../sqlclient/doc/samples/SqlCommand.cs#1)]
- The following sample shows how to create and execute different types of SqlCommand objects.
- First you must create the sample database, by executing the following script:
- [!code-sql[Setup Database](~/../sqlclient/doc/samples/SqlCommand_Setup.sql#1)]
- Next, compile and execute the following:
- [!code-csharp[SqlCommand Example#2](~/../sqlclient/doc/samples/SqlCommand_Intro.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.#ctor">
- <summary>
- Initializes a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- class.
- </summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.#ctor(System.String)">
- <param name="cmdText">
- The text of the query.
- </param><summary>
- Initializes a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- class with the text of the query.
- </summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.#ctor(System.String,Microsoft.Data.SqlClient.SqlConnection)">
- <param name="cmdText">
- The text of the query.
- </param><param name="connection">
- A
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- that represents the connection to an instance of SQL Server.
- </param><summary>
- Initializes a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- class with the text of the query and a
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- .
- </summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.#ctor(System.String,Microsoft.Data.SqlClient.SqlConnection,Microsoft.Data.SqlClient.SqlTransaction)">
- <param name="cmdText">
- The text of the query.
- </param><param name="connection">
- A
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- that represents the connection to an instance of SQL Server.
- </param><param name="transaction">
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlTransaction" />
- in which the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- executes.
- </param><summary>
- Initializes a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- class with the text of the query, a
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- , and the
- <see cref="T:Microsoft.Data.SqlClient.SqlTransaction" />
- .
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The following table shows initial property values for an instance of <xref:Microsoft.Data.SqlClient.SqlCommand>.
- |Properties|Initial value|
- |----------------|-------------------|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.CommandText%2A>|`cmdText`|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.CommandTimeout%2A>|30|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.CommandType%2A>|`CommandType.Text`|
- |<xref:Microsoft.Data.SqlClient.SqlCommand.Connection%2A>|A new <xref:Microsoft.Data.SqlClient.SqlConnection> that is the value for the `connection` parameter.|
- You can change the value for any of these parameters by setting the related property.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.CommandText">
- <summary>
- Gets or sets the Transact-SQL statement, table name or stored procedure to execute at the data source.
- </summary><value>
- The Transact-SQL statement or stored procedure to execute. The default is an empty string.
- </value><remarks>
- <format type="text/markdown"><.
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlCommand> and sets some of its properties.
- [!code-csharp[SqlCommand_CommandText](~/../sqlclient/doc/samples/SqlCommand_CommandText.cs)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.CommandTimeout">
- <summary>
- Gets or sets the wait time (in seconds) before terminating the attempt to execute a command and generating an error. The default is 30 seconds.
- </summary><value>
- The time in seconds to wait for the command to execute. The default is 30 seconds.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- A value of 0 indicates no limit (an attempt to execute a command will wait indefinitely).
- > [!NOTE]
- > The <xref:Microsoft.Data.SqlClient.SqlCommand.CommandTimeout%2A> property will be ignored during old-style asynchronous method calls such as <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A>. It will be honored by the newer async methods such as <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync%2A>.
- <xref:Microsoft.Data.SqlClient.SqlCommand.CommandTimeout%2A> has no effect when the command is executed against a context connection (a <xref:Microsoft.Data.SqlClient.SqlConnection> opened with "context connection=true" in the connection string).
- > [!NOTE]
- > This property is the cumulative time-out (for all network packets that are read during the invocation of a method) for all network reads during command execution or processing of the results. A time-out can still occur after the first row is returned, and does not include user processing time, only network read time.
- For example, with a 30 second time out, if <xref:Microsoft.Data.SqlClient.SqlDataReader.Read%2A> requires two network packets, then it has 30 seconds to read both network packets. If you call <xref:Microsoft.Data.SqlClient.SqlDataReader.Read%2A> again, it will have another 30 seconds to read any data that it requires.
- [!code-csharp[SqlCommand CommandTimeout](~/../sqlclient/doc/samples/SqlCommand_CommandTimeout.cs)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.CommandType">
- <summary>
- Gets or sets a value indicating how the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- property is to be interpreted.
- </summary><value>
- One of the
- <see cref="T:System.Data.CommandType" />
- values. The default is
- <see langword="Text" />
- .
- </value><remarks>
- <format type="text/markdown"><.
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlCommand> and sets some of its properties.
- [!code-csharp[IDbCommand_CommandTimeout](~/../sqlclient/doc/samples/IDbCommand_CommandTimeout.cs)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.Connection">
- <summary>
- Gets or sets the
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- used by this instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
- </summary><value>
- The connection to a data source. The default value is
- <see langword="null" />
- .
- </value><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">
- The
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- property was changed while the command was enlisted in a transaction.
- </exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.DbConnection">
- <summary>
- To be added.
- </summary><value>
- To be added.
- </value><remarks>
- To be added.
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.DbParameterCollection">
- <summary>
- To be added.
- </summary><value>
- To be added.
- </value><remarks>
- To be added.
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.DbTransaction">
- <summary>
- To be added.
- </summary><value>
- To be added.
- </value><remarks>
- To be added.
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.DesignTimeVisible">
- <summary>
- Gets or sets a value indicating whether the command object should be visible in a Windows Form Designer control.
- </summary><value>
- A value indicating whether the command object should be visible in a control. The default is
- <see langword="true" />
- .
- </value><remarks>
- To be added.
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.Parameters">
- <summary>
- Gets the
- <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />
- .
- </summary><value>
- The parameters of the Transact-SQL statement or stored procedure. The default is an empty collection.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The Microsoft .NET Framework Data Provider for SQL Server does not support the question mark (?) placeholder for passing parameters to a SQL Statement or a stored procedure called by a command of `CommandType.Text`. In this case, named parameters must be used. For example:
- SELECT * FROM Customers WHERE CustomerID = @CustomerID
- > [!NOTE]
- > If the parameters in the collection do not match the requirements of the query to be executed, an error may result.
- For more information, see [Configuring Parameters and Parameter Data Types](~/docs/framework/data/adonet/configuring-parameters-and-parameter-data-types.md).
- ## Examples
- The following example demonstrates how to create a <xref:Microsoft.Data.SqlClient.SqlCommand> and add parameters to the <xref:Microsoft.Data.SqlClient.SqlParameterCollection>.
- [!code-csharp[SqlParameterCollection.AddWithValue#1](~/../sqlclient/doc/samples/SqlParameterCollection_AddWithValue.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.Transaction">
- <summary>
- Gets or sets the
- <see cref="T:Microsoft.Data.SqlClient.SqlTransaction" />
- within which the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- executes.
- </summary><value>
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlTransaction" />
- . The default value is
- <see langword="null" />
- .
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- You cannot set the <xref:Microsoft.Data.SqlClient.SqlCommand.Transaction%2A> property if it is already set to a specific value, and the command is in the process of executing. If you set the transaction property to a <xref:Microsoft.Data.SqlClient.SqlTransaction> object that is not connected to the same <xref:Microsoft.Data.SqlClient.SqlConnection> as the <xref:Microsoft.Data.SqlClient.SqlCommand> object, an exception is thrown the next time that you attempt to execute a statement.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.UpdatedRowSource">
- <summary>
- Gets or sets how command results are applied to the <see cref="T:System.Data.DataRow" /> when used by the **Update** method of the <see cref="T:System.Data.Common.DbDataAdapter" />.
- </summary><value>
- One of the <see cref="T:System.Data.UpdateRowSource" /> values.
- </value><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="E:Microsoft.Data.SqlClient.SqlCommand.StatementCompleted">
- <summary>
- Occurs when the execution of a Transact-SQL statement completes.
- </summary><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery">
- <summary>
- Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
- </summary><returns>
- An
- <see cref="T:System.IAsyncResult" />
- that can be used to poll or wait for results, or both; this value is also needed when invoking
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" />
- , which returns the number of affected rows.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Any error that occurred while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery(System.AsyncCallback,System.Object)">
- <param name="callback">
- An
- <see cref="T:System.AsyncCallback" />
- delegate that is invoked when the command's execution has completed. Pass
- <see langword="null" />
- (
- <see langword="Nothing" />
- in Microsoft Visual Basic) to indicate that no callback is required.
- </param><param name="stateObject">
- A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the
- <see cref="P:System.IAsyncResult.AsyncState" />
- property.
- </param><summary>
- Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- , given a callback procedure and state information.
- </summary><returns>
- An
- <see cref="T:System.IAsyncResult" />
- that can be used to poll or wait for results, or both; this value is also needed when invoking
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" />
- , which returns the number of affected rows.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Any error that occurred while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader">
- <summary>
- Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- , and retrieves one or more result sets from the server.
- </summary><returns>
- An
- <see cref="T:System.IAsyncResult" />
- that can be used to poll or wait for results, or both; this value is also needed when invoking
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />
- , which returns a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- instance that can be used to retrieve the returned rows.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Any error that occurred while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader(System.AsyncCallback,System.Object)">
- <param name="callback">
- An
- <see cref="T:System.AsyncCallback" />
- delegate that is invoked when the command's execution has completed. Pass
- <see langword="null" />
- (
- <see langword="Nothing" />
- in Microsoft Visual Basic) to indicate that no callback is required.
- </param><param name="stateObject">
- A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the
- <see cref="P:System.IAsyncResult.AsyncState" />
- property.
- </param><summary>
- Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- and retrieves one or more result sets from the server, given a callback procedure and state information.
- </summary><returns>
- An
- <see cref="T:System.IAsyncResult" />
- that can be used to poll, wait for results, or both; this value is also needed when invoking
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />
- , which returns a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- instance which can be used to retrieve the returned rows.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Any error that occurred while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader(System.AsyncCallback,System.Object,System.Data.CommandBehavior)">
- <param name="callback">
- An
- <see cref="T:System.AsyncCallback" />
- delegate that is invoked when the command's execution has completed. Pass
- <see langword="null" />
- (
- <see langword="Nothing" />
- in Microsoft Visual Basic) to indicate that no callback is required.
- </param><param name="stateObject">
- A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the
- <see cref="P:System.IAsyncResult.AsyncState" />
- property.
- </param><param name="behavior">
- One of the
- <see cref="T:System.Data.CommandBehavior" />
- values, indicating options for statement execution and data retrieval.
- </param><summary>
- Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- , using one of the
- <see langword="CommandBehavior" />
- values, and retrieving one or more result sets from the server, given a callback procedure and state information.
- </summary><returns>
- An
- <see cref="T:System.IAsyncResult" />
- that can be used to poll or wait for results, or both; this value is also needed when invoking
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />
- , which returns a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- instance which can be used to retrieve the returned rows.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Any error that occurred while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader(System.Data.CommandBehavior)">
- <param name="behavior">
- One of the
- <see cref="T:System.Data.CommandBehavior" />
- values, indicating options for statement execution and data retrieval.
- </param><summary>
- Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- using one of the
- <see cref="T:System.Data.CommandBehavior" />
- values.
- </summary><returns>
- An
- <see cref="T:System.IAsyncResult" />
- that can be used to poll, wait for results, or both; this value is also needed when invoking
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />
- , which returns a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- instance that can be used to retrieve the returned rows.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Any error that occurred while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader">
- <summary>
- Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- and returns results as an
- <see cref="T:System.Xml.XmlReader" />
- object.
- </summary><returns>
- An
- <see cref="T:System.IAsyncResult" />
- that can be used to poll or wait for results, or both; this value is also needed when invoking
- <see langword="EndExecuteXmlReader" />
- , which returns a single XML value.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Any error that occurred while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader(System.AsyncCallback,System.Object)">
- <param name="callback">
- An
- <see cref="T:System.AsyncCallback" />
- delegate that is invoked when the command's execution has completed. Pass
- <see langword="null" />
- (
- <see langword="Nothing" />
- in Microsoft Visual Basic) to indicate that no callback is required.
- </param><param name="stateObject">
- A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the
- <see cref="P:System.IAsyncResult.AsyncState" />
- property.
- </param><summary>
- Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- and returns results as an
- <see cref="T:System.Xml.XmlReader" />
- object, using a callback procedure.
- </summary><returns>
- An
- <see cref="T:System.IAsyncResult" />
- that can be used to poll, wait for results, or both; this value is also needed when the
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" />
- is called, which returns the results of the command as XML.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- Any error that occurred while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><altmember cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /><altmember cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReader" />
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.Cancel">
- <summary>
- Tries to cancel the execution of a
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- .
- </summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.Clone">
- <summary>
- Creates a new
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- object that is a copy of the current instance.
- </summary><returns>
- A new
- <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- object that is a copy of this instance.
- </returns><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.CreateDbParameter">
- <summary>
- To be added.
- </summary><returns>
- To be added.
- </returns><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.CreateParameter">
- <summary>
- Creates a new instance of a
- <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />
- object.
- </summary><returns>
- A
- <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />
- object.
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlCommand.CreateParameter%2A> method is a strongly-typed version of <xref:System.Data.IDbCommand.CreateParameter%2A>.
- ]]></format>
- </remarks><summary>
- Creates a new instance of a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object.
- </summary><returns>
- A <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object.
- </returns><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)">
- <param name="asyncResult">
- The
- <see cref="T:System.IAsyncResult" />
- returned by the call to
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" />
- .
- </param><summary>
- Finishes asynchronous execution of a Transact-SQL statement.
- </summary><returns>
- The number of rows affected (the same behavior as
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery" />
- ).
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- When you call <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery> to execute a Transact-SQL statement, you must call <xref:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery%2A> in order to complete the operation. If the process of executing the command has not yet finished, this method blocks until the operation is complete. Users can verify that the command has completed its operation by using the <xref:System.IAsyncResult> instance returned by the <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery> method. If a callback procedure was specified in the call to <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery>, this method must be called.
- ## Examples
- For examples demonstrating the use of the <xref:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery%2A> method, see <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery>.
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">
- <paramref name="asyncResult" />
- parameter is null (
- <see langword="Nothing" />
- in Microsoft Visual Basic)
- </exception><exception cref="T:System.InvalidOperationException">
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" />
- was called more than once for a single command execution, or the method was mismatched against its execution method (for example, the code called
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" />
- to complete execution of a call to
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- The amount of time specified in
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandTimeout" />
- elapsed and the asynchronous operation specified with
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" />
- is not complete.
-
- -or-
-
- In some situations,
- <see cref="T:System.IAsyncResult" />
- can be set to
- <see langword="IsCompleted" />
- incorrectly. If this occurs and
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" />
- is called, EndExecuteNonQuery could raise a SqlException error if the amount of time specified in
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandTimeout" />
- elapsed and the asynchronous operation specified with
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" />
- is not complete. To correct this situation, you should either increase the value of CommandTimeout or reduce the work being done by the asynchronous operation.
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)">
- <param name="asyncResult">
- The
- <see cref="T:System.IAsyncResult" />
- returned by the call to
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader" />
- .
- </param><summary>
- Finishes asynchronous execution of a Transact-SQL statement, returning the requested
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- .
- </summary><returns>
- A
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- object that can be used to retrieve the requested rows.
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- When you call <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A> to execute a Transact-SQL statement, you must call <xref:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader%2A> in order to complete the operation. If the process of executing the command has not yet finished, this method blocks until the operation is complete. Users can verify that the command has completed its operation by using the <xref:System.IAsyncResult> instance returned by the <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A> method. If a callback procedure was specified in the call to <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A>, this method must be called.
- ## Examples
- For examples demonstrating the use of the <xref:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader%2A> method, see <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A>.
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">
- <paramref name="asyncResult" />
- parameter is null (
- <see langword="Nothing" />
- in Microsoft Visual Basic)
- </exception><exception cref="T:System.InvalidOperationException">
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />
- was called more than once for a single command execution, or the method was mismatched against its execution method (for example, the code called
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />
- to complete execution of a call to
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" />
- .
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)">
- <param name="asyncResult">
- The
- <see cref="T:System.IAsyncResult" />
- returned by the call to
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" />
- .
- </param><summary>
- Finishes asynchronous execution of a Transact-SQL statement, returning the requested data as XML.
- </summary><returns>
- An
- <see cref="T:System.Xml.XmlReader" />
- object that can be used to fetch the resulting XML data.
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- When you call <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader%2A> to execute a Transact-SQL statement, you must call <xref:Microsoft.Data.SqlClient.SqlCommand.EndExecuteXmlReader%2A> in order to complete the operation. If the process of executing the command has not yet finished, this method blocks until the operation is complete. Users can verify that the command has completed its operation by using the <xref:System.IAsyncResult> instance returned by the <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader%2A> method. If a callback procedure was specified in the call to <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader%2A>, this method must be called.
- ## Examples
- For examples demonstrating the use of the <xref:Microsoft.Data.SqlClient.SqlCommand.EndExecuteXmlReader%2A> method, see <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader%2A>.
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">
- <paramref name="asyncResult" />
- parameter is null (
- <see langword="Nothing" />
- in Microsoft Visual Basic)
- </exception><exception cref="T:System.InvalidOperationException">
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" />
- was called more than once for a single command execution, or the method was mismatched against its execution method (for example, the code called
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" />
- to complete execution of a call to
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" />
- .
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(System.Data.CommandBehavior)">
- <param name="behavior">
- To be added.
- </param><summary>
- To be added.
- </summary><returns>
- To be added.
- </returns><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReaderAsync(System.Data.CommandBehavior,System.Threading.CancellationToken)">
- <param name="behavior">
- To be added.
- </param><param name="cancellationToken">
- To be added.
- </param><summary>
- To be added.
- </summary><returns>
- To be added.
- </returns><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery">
- <summary>
- Executes a Transact-SQL statement against the connection and returns the number of rows affected.
- </summary><returns>
- The number of rows affected.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- An exception occurred while executing the command against a locked row. This exception is not generated when you are using Microsoft .NET Framework version 1.0.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQueryAsync(System.Threading.CancellationToken)">
- <param name="cancellationToken">
- The cancellation instruction.
- </param><summary>
- An asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery" />
- , which executes a Transact-SQL statement against the connection and returns the number of rows affected. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQueryAsync(System.Threading.CancellationToken)" />
- more than once for the same instance before task completion.
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- SQL Server returned an error while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader">
- <summary>
- Sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- and builds a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- .
- </summary><returns>
- A
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- object.
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- When the <xref:Microsoft.Data.SqlClient.SqlCommand.CommandType%2A> property is set to `StoredProcedure`, the <xref:Microsoft.Data.SqlClient.SqlCommand.CommandText%2A> property should be set to the name of the stored procedure. The command executes this stored procedure when you call <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A>.
- > [!NOTE]
- > If a transaction is deadlocked, an exception may not be thrown until <xref:Microsoft.Data.SqlClient.SqlDataReader.Read%2A> is called.
- The multiple active result set (MARS) feature allows for multiple actions using the same connection.
- If you use <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A> or <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A> to access XML data, SQL Server will return any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReader%2A> or <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader%2A> to read FOR XML queries.
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlCommand>, and then executes it by passing a string that is a Transact-SQL SELECT statement, and a string to use to connect to the data source.
- [!code-csharp[SqlCommand_ExecuteReader](~/../sqlclient/doc/samples/SqlCommand_ExecuteReader.cs)]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- An exception occurred while executing the command against a locked row. This exception is not generated when you are using Microsoft .NET Framework version 1.0.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The current state of the connection is closed.
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader" />
- requires an open
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- .
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior)">
- <param name="behavior">
- One of the
- <see cref="T:System.Data.CommandBehavior" />
- values.
- </param><summary>
- Sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- , and builds a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- using one of the
- <see cref="T:System.Data.CommandBehavior" />
- values.
- </summary><returns>
- A
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- object.
- </returns><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- When the <xref:Microsoft.Data.SqlClient.SqlCommand.CommandType%2A> property is set to `StoredProcedure`, the <xref:Microsoft.Data.SqlClient.SqlCommand.CommandText%2A> property should be set to the name of the stored procedure. The command executes this stored procedure when you call <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A>.
- > [!NOTE]
- > Use <xref:System.Data.CommandBehavior.SequentialAccess> to retrieve large values and binary data. Otherwise, an <xref:System.OutOfMemoryException> might occur and the connection will be closed.
- The multiple active result set (MARS) feature allows for multiple actions using the same connection.
- If you use <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A> or <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteReader%2A> to access XML data, SQL Server will return any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReader%2A> or <xref:Microsoft.Data.SqlClient.SqlCommand.BeginExecuteXmlReader%2A> to read FOR XML queries.
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlCommand>, and then executes it by passing a string that is a Transact-SQL SELECT statement, and a string to use to connect to the data source. <xref:System.Data.CommandBehavior> is set to <xref:System.Data.CommandBehavior.CloseConnection>.
- [!code-csharp[SqlCommand_ExecuteReader2](~/../sqlclient/doc/samples/SqlCommand_ExecuteReader2.cs#1)]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync">
- <summary>
- An asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader" />
- , which sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- and builds a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- . Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:System.ArgumentException">
- An invalid
- <see cref="T:System.Data.CommandBehavior" />
- value.
- </exception><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync" />
- more than once for the same instance before task completion.
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- SQL Server returned an error while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Data.CommandBehavior)">
- <param name="behavior">
- Options for statement execution and data retrieval. When is set to
- <see langword="Default" />
- ,
- <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.ReadAsync(System.Threading.CancellationToken)" />
- reads the entire row before returning a complete Task.
- </param><summary>
- An asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior)" />
- , which sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- , and builds a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- . Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:System.ArgumentException">
- An invalid
- <see cref="T:System.Data.CommandBehavior" />
- value.
- </exception><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Data.CommandBehavior)" />
- more than once for the same instance before task completion.
-
- -or-
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- SQL Server returned an error while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Data.CommandBehavior,System.Threading.CancellationToken)">
- <param name="behavior">
- Options for statement execution and data retrieval. When is set to
- <see langword="Default" />
- ,
- <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.ReadAsync(System.Threading.CancellationToken)" />
- reads the entire row before returning a complete Task.
- </param><param name="cancellationToken">
- The cancellation instruction.
- </param><summary>
- An asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior)" />
- , which sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- , and builds a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:System.ArgumentException">
- An invalid
- <see cref="T:System.Data.CommandBehavior" />
- value.
- </exception><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Data.CommandBehavior,System.Threading.CancellationToken)" />
- more than once for the same instance before task completion.
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- SQL Server returned an error while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Threading.CancellationToken)">
- <param name="cancellationToken">
- The cancellation instruction.
- </param><summary>
- An asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader" />
- , which sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- and builds a
- <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />
- .
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown">
- <.
- ]]>
- </format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:System.ArgumentException">
- An invalid
- <see cref="T:System.Data.CommandBehavior" />
- value.
- </exception><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Data.CommandBehavior,System.Threading.CancellationToken)" />
- more than once for the same instance before task completion.
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- SQL Server returned an error while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalar">
- <summary>
- Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.
- </summary><returns>
- The first column of the first row in the result set, or a null reference (
- <see langword="Nothing" />
- in Visual Basic) if the result set is empty. Returns a maximum of 2033 characters.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- An exception occurred while executing the command against a locked row. This exception is not generated when you are using Microsoft .NET Framework version 1.0.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalarAsync(System.Threading.CancellationToken)">
- <param name="cancellationToken">
- The cancellation instruction.
- </param><summary>
- An asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalar" />
- , which executes the query asynchronously and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalarAsync(System.Threading.CancellationToken)" />
- more than once for the same instance before task completion.
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- SQL Server returned an error while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReader">
- <summary>
- Sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- and builds an
- <see cref="T:System.Xml.XmlReader" />
- object.
- </summary><returns>
- An
- <see cref="T:System.Xml.XmlReader" />
- object.
- </returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- An exception occurred while executing the command against a locked row. This exception is not generated when you are using Microsoft .NET Framework version 1.0.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.InvalidOperationException">
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReaderAsync">
- <summary>
- An asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReader" />
- , which sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- and builds an
- <see cref="T:System.Xml.XmlReader" />
- object.
-
- Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalarAsync(System.Threading.CancellationToken)" />
- more than once for the same instance before task completion.
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- SQL Server returned an error while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReaderAsync(System.Threading.CancellationToken)">
- <param name="cancellationToken">
- The cancellation instruction.
- </param><summary>
- An asynchronous version of
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteXmlReader" />
- , which sends the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandText" />
- to the
- <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Connection" />
- and builds an
- <see cref="T:System.Xml.XmlReader" />
- object.
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.
- </summary><returns>
- A task representing the asynchronous operation.
- </returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Binary** or **VarBinary** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.Stream" />
- . For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.IO.TextReader" />
- .
-
- -or-
-
- A
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType" />
- other than **Xml** was used when
- <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />
- was set to
- <see cref="T:System.Xml.XmlReader" />
- .
- </exception><exception cref="T:System.InvalidOperationException">
- Calling
- <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalarAsync(System.Threading.CancellationToken)" />
- more than once for the same instance before task completion.
-
- -or-
-
- The
- <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />
- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- -or-
- <see langword="Context Connection=true" />
- is specified in the connection string.
- </exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">
- SQL Server returned an error while executing the command text.
-
- -or-
-
- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.IO.IOException">
- An error occurred in a
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception><exception cref="T:System.ObjectDisposedException">
- The
- <see cref="T:System.IO.Stream" />
- ,
- <see cref="T:System.Xml.XmlReader" />
- or
- <see cref="T:System.IO.TextReader" />
- object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
- </exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.Prepare">
- <summary>
- Creates a prepared version of the command on an instance of SQL Server.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- If <xref:Microsoft.Data.SqlClient.SqlCommand.CommandType%2A> is set to `StoredProcedure`, the call to <xref:Microsoft.Data.SqlClient.SqlCommand.Prepare%2A> should succeed, although it may cause a no-op.
- Before you call <xref:Microsoft.Data.SqlClient.SqlCommand.Prepare%2A>, specify the data type of each parameter in the statement to be prepared. For each parameter that has a variable length data type, you must set the <xref:Microsoft.Data.SqlClient.SqlParameter.Size%2A> property to the maximum size needed. <xref:Microsoft.Data.SqlClient.SqlCommand.Prepare%2A> returns an error if these conditions are not met.
- > [!NOTE]
- > If the database context is changed by executing the Transact-SQL `USE <database>` statement, or by calling the <xref:Microsoft.Data.SqlClient.SqlConnection.ChangeDatabase%2A> method, then <xref:Microsoft.Data.SqlClient.SqlCommand.Prepare%2A> must be called a second time.
- If you call an `Execute` method after calling <xref:Microsoft.Data.SqlClient.SqlCommand.Prepare%2A>, any parameter value that is larger than the value specified by the <xref:Microsoft.Data.SqlClient.SqlParameter.Size%2A> property is automatically truncated to the original specified size of the parameter, and no truncation errors are returned.
- Output parameters (whether prepared or not) must have a user-specified data type. If you specify a variable length data type, you must also specify the maximum <xref:Microsoft.Data.SqlClient.SqlParameter.Size%2A>.
- Prior to Visual Studio 2010, <xref:Microsoft.Data.SqlClient.SqlCommand.Prepare%2A> threw an exception. Beginning in Visual Studio 2010, this method does not throw an exception.
- ## Examples
- The following example demonstrates the use of the <xref:Microsoft.Data.SqlClient.SqlCommand.Prepare%2A> method.
- [!code-csharp[SqlCommand.Prepare#1](~/../sqlclient/doc/samples/SqlCommand_Prepare.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommand.Notification">
- <summary>
- Gets or sets a value that specifies the
- <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" />
- object bound to this command.
- </summary><value>
- When set to null (default), no notification should be requested.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- You must set the value for this property before the command is executed for it to take effect.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.ResetCommandTimeout">
- <summary> Resets the <see cref="P:Microsoft.Data.SqlClient.SqlCommand.CommandTimeout" /> property to its default value.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value of the <xref:Microsoft.Data.SqlClient.SqlCommand.CommandTimeout%2A> is 30 seconds.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommand.Dispose(System.Boolean)">
- <param name="disposing">
- To be added.
- </param><summary>
- To be added.
- </summary><remarks>
- To be added.
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlCommandBuilder">
- <summary>
- Automatically generates single-table commands that are used to reconcile changes made to a
- <see cref="T:System.Data.DataSet" />
- with the associated SQL Server database. This class cannot be inherited.
- </summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.#ctor">
- <summary>
- Initializes a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommandBuilder" />
- class.
- </summary><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.#ctor(Microsoft.Data.SqlClient.SqlDataAdapter)">
- <param name="adapter">
- The name of the
- <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" />
- .
- </param><summary>
- Initializes a new instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommandBuilder" />
- class with the associated
- <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" />
- object.
- </summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlCommandBuilder> registers itself as a listener for <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> events that are generated by the <xref:Microsoft.Data.SqlClient.SqlDataAdapter> specified in this property.
- When you create a new instance of <xref:Microsoft.Data.SqlClient.SqlCommandBuilder>, any existing <xref:Microsoft.Data.SqlClient.SqlCommandBuilder> associated with this <xref:Microsoft.Data.SqlClient.SqlDataAdapter> is released.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommandBuilder.CatalogLocation">
- <summary>
- Sets or gets the
- <see cref="T:System.Data.Common.CatalogLocation" />
- for an instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommandBuilder" />
- class.
- </summary><value>
- A
- <see cref="T:System.Data.Common.CatalogLocation" />
- object.
- </value><remarks>
- To be added.
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommandBuilder.CatalogSeparator">
- <summary>
- Sets or gets a string used as the catalog separator for an instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommandBuilder" />
- class.
- </summary><value>
- A string that indicates the catalog separator for use with an instance of the
- <see cref="T:Microsoft.Data.SqlClient.SqlCommandBuilder" />
- class.
- </value><remarks>
- To be added.
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommandBuilder.DataAdapter">
- <summary>Gets or sets a <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" /> object for which Transact-SQL statements are automatically generated.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" /> object.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlCommandBuilder> registers itself as a listener for <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> events that are generated by the <xref:Microsoft.Data.SqlClient.SqlDataAdapter> specified in this property.
- When you create a new instance of <xref:Microsoft.Data.SqlClient.SqlCommandBuilder>, any existing <xref:Microsoft.Data.SqlClient.SqlCommandBuilder> associated with this <xref:Microsoft.Data.SqlClient.SqlDataAdapter> is released.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.DeriveParameters(Microsoft.Data.SqlClient.SqlCommand)">
- <param name="command">The <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> referencing the stored procedure from which the parameter information is to be derived. The derived parameters are added to the <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Parameters" /> collection of the <see cref="T:Microsoft.Data.SqlClient.SqlCommand" />.</param><summary>Retrieves parameter information from the stored procedure specified in the <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> and populates the <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Parameters" /> collection of the specified <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object.</summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The command text is not a valid stored procedure name.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommandBuilder.QuotePrefix">
- <summary>Gets or sets the starting character or characters to use when specifying SQL Server database objects, such as tables or columns, whose names contain characters such as spaces or reserved tokens.</summary><value>The starting character or characters to use. The default is an empty string.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- > [!NOTE]
- > Although you cannot change the <xref:Microsoft.Data.SqlClient.SqlCommandBuilder.QuotePrefix%2A> or <xref:Microsoft.Data.SqlClient.SqlCommandBuilder.QuoteSuffix%2A> properties after an insert, update, or delete command has been generated, you can change their settings after calling the `Update` method of a DataAdapter.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">This property cannot be changed after an INSERT, UPDATE, or DELETE command has been generated.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommandBuilder.QuoteSuffix">
- <summary>Gets or sets the ending character or characters to use when specifying SQL Server database objects, such as tables or columns, whose names contain characters such as spaces or reserved tokens.</summary><value>The ending character or characters to use. The default is an empty string.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- > [!NOTE]
- > Although you cannot change the <xref:Microsoft.Data.SqlClient.SqlCommandBuilder.QuotePrefix%2A> or <xref:Microsoft.Data.SqlClient.SqlCommandBuilder.QuoteSuffix%2A> properties after an insert, update, or delete operation has been generated, you can change their settings after calling the `Update` method of a DataAdapter.
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">This property cannot be changed after an insert, update, or delete command has been generated.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCommandBuilder.SchemaSeparator">
- <summary>Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.</summary><value>The character to be used as the schema separator.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Generally, database servers indicate the schema for a identifier by separating the schema name from the identifier with some character. For example, SQL Server uses a period, creating complete identifiers such as Person.CustomerName, where "Person" is the schema name and "CustomerName" is the identifier. Setting this property lets developers modify this behavior.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.ApplyParameterInfo(System.Data.Common.DbParameter,System.Data.DataRow,System.Data.StatementType,System.Boolean)">
- <param name="parameter">
- To be added.
- </param><param name="datarow">
- To be added.
- </param><param name="statementType">
- To be added.
- </param><param name="whereClause">
- To be added.
- </param><summary>
- To be added.
- </summary><remarks>
- To be added.
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetDeleteCommand">
- <summary>Gets the automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object required to perform deletions on the database.</summary><returns>The automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object required to perform deletions.</returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetDeleteCommand(System.Boolean)">
- <param name="useColumnsForParameterNames">If <see langword="true" />, generate parameter names matching column names if possible. If <see langword="false" />, generate <c>@p1</c>, <c>@p2</c>, and so on.</param><summary>Gets the automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object that is required to perform deletions on the database.</summary><returns>The automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object that is required to perform deletions.</returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetInsertCommand">
- <summary>Gets the automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object required to perform insertions on the database.</summary><returns>The automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object required to perform insertions.</returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetInsertCommand(System.Boolean)">
- <param name="useColumnsForParameterNames">If <see langword="true" />, generate parameter names matching column names if possible. If <see langword="false" />, generate <c>@p1</c>, <c>@p2</c>, and so on.</param><summary>Gets the automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object that is required to perform insertions on the database.</summary><returns>The automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object that is required to perform insertions.</returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetParameterName(System.Int32)">
- <param name="parameterOrdinal">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetParameterName(System.String)">
- <param name="parameterName">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetParameterPlaceholder(System.Int32)">
- <param name="parameterOrdinal">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetSchemaTable(System.Data.Common.DbCommand)">
- <param name="srcCommand">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetUpdateCommand">
- <summary>Gets the automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object required to perform updates on the database.</summary><returns>The automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object that is required to perform updates.</returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.GetUpdateCommand(System.Boolean)">
- <param name="useColumnsForParameterNames">If <see langword="true" />, generate parameter names matching column names if possible. If <see langword="false" />, generate <c>@p1</c>, <c>@p2</c>, and so on.</param><summary>Gets the automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object required to perform updates on the database.</summary><returns>The automatically generated <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object required to perform updates.</returns><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.InitializeCommand(System.Data.Common.DbCommand)">
- <param name="command">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.QuoteIdentifier(System.String)">
- <param name="unquotedIdentifier">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.SetRowUpdatingHandler(System.Data.Common.DbDataAdapter)">
- <param name="adapter">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCommandBuilder.UnquoteIdentifier(System.String)">
- <param name="quotedIdentifier">The identifier that will have its embedded quotes removed.</param><summary>Given a quoted identifier, returns the correct unquoted form of that identifier. This includes correctly unescaping any embedded quotes in the identifier.</summary><returns>The unquoted identifier, with embedded quotes properly unescaped.</returns><remarks>To be added.</remarks><related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Connecting and Retrieving Data in ADO.NET</related><related type="Article" href="~/docs/framework/data/adonet/sql/index.md">Using the .NET Framework Data Provider for SQL Server</related><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">ADO.NET Overview</related>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlConnection">
- <summary>Represents a connection to a SQL Server database. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- A <xref:Microsoft.Data.SqlClient.SqlConnection> object represents a unique session to a SQL Server data source. With a client/server database system, it is equivalent to a network connection to the server. <xref:Microsoft.Data.SqlClient.SqlConnection> is used together with <xref:Microsoft.Data.SqlClient.SqlDataAdapter> and <xref:Microsoft.Data.SqlClient.SqlCommand> to increase performance when connecting to a Microsoft SQL Server database. For all third-party SQL Server products and other OLE DB-supported data sources, use <xref:System.Data.OleDb.OleDbConnection>.
-
- When you create an instance of <xref:Microsoft.Data.SqlClient.SqlConnection>, all properties are set to their initial values. For a list of these values, see the <xref:Microsoft.Data.SqlClient.SqlConnection> constructor.
-
- See <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A> for a list of the keywords in a connection string.
-
- If the <xref:Microsoft.Data.SqlClient.SqlConnection> goes out of scope, it won't be closed. Therefore, you must explicitly close the connection by calling `Close` or `Dispose`. `Close` and `Dispose` are functionally equivalent. If the connection pooling value `Pooling` is set to `true` or `yes`, the underlying connection is returned back to the connection pool. On the other hand, if `Pooling` is set to `false` or `no`, the underlying connection to the server is actually closed.
-
- > [!NOTE]
- > Login and logout events will not be raised on the server when a connection is fetched from or returned to the connection pool, because the connection is not actually closed when it is returned to the connection pool. For more information, see [SQL Server Connection Pooling (ADO.NET)](~/docs/framework/data/adonet/sql-server-connection-pooling.md).
-
- To ensure that connections are always closed, open the connection inside of a `using` block, as shown in the following code fragment. Doing so ensures that the connection is automatically closed when the code exits the block.
-
- ```vb
- Using connection As New SqlConnection(connectionString)
- connection.Open()
- ' Do work here; connection closed on following line.
- End Using
-
- ```
-
- ```csharp
- using (SqlConnection connection = new SqlConnection(connectionString))
- {
- connection.Open();
- // Do work here; connection closed on following line.
- }
- ```
-
- > [!NOTE]
- > To deploy high-performance applications, you must use connection pooling. When you use the .NET Framework Data Provider for SQL Server, you do not have to enable connection pooling because the provider manages this automatically, although you can modify some settings. For more information, see [SQL Server Connection Pooling (ADO.NET)](~/docs/framework/data/adonet/sql-server-connection-pooling.md).
-
- If a <xref:Microsoft.Data.SqlClient.SqlException> is generated by the method executing a <xref:Microsoft.Data.SqlClient.SqlCommand>, the <xref:Microsoft.Data.SqlClient.SqlConnection> remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the <xref:Microsoft.Data.SqlClient.SqlConnection>. However, the user can reopen the connection and continue.
-
- An application that creates an instance of the <xref:Microsoft.Data.SqlClient.SqlConnection> object can require all direct and indirect callers to have sufficient permission to the code by setting declarative or imperative security demands. <xref:Microsoft.Data.SqlClient.SqlConnection> makes security demands using the <xref:Microsoft.Data.SqlClient.SqlClientPermission> object. Users can verify that their code has sufficient permissions by using the <xref:Microsoft.Data.SqlClient.SqlClientPermissionAttribute> object. Users and administrators can also use the [Caspol.exe (Code Access Security Policy Tool)](~/docs/framework/tools/caspol-exe-code-access-security-policy-tool.md) to modify security policy at the machine, user, and enterprise levels. For more information, see [Security in .NET](~/docs/standard/security/index.md). For an example demonstrating how to use security demands, see [Code Access Security and ADO.NET](~/docs/framework/data/adonet/code-access-security.md).
-
- For more information about handling warning and informational messages from the server, see [Connection Events](~/docs/framework/data/adonet/connection-events.md). For more information about SQL Server engine errors and error messages, see [Database Engine Events and Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors).
-
- > [!CAUTION]
- > You can force TCP instead of shared memory. You can do that by prefixing tcp: to the server name in the connection string or you can use localhost.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlCommand> and a <xref:Microsoft.Data.SqlClient.SqlConnection>. The <xref:Microsoft.Data.SqlClient.SqlConnection> is opened and set as the <xref:Microsoft.Data.SqlClient.SqlCommand.Connection%2A> for the <xref:Microsoft.Data.SqlClient.SqlCommand>. The example then calls <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery%2A>. To accomplish this, the <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery%2A> is passed a connection string and a query string that is a Transact-SQL INSERT statement. The connection is closed automatically when the code exits the using block.
-
- [!code-csharp[SqlCommand_ExecuteNonQuery Example#1](~/../sqlclient/doc/samples/SqlCommand_ExecuteNonQuery.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.#ctor">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> class.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.#ctor(System.String)">
- <param name="connectionString">The connection used to open the SQL Server database.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> class when given a string that contains the connection string.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.#ctor(System.String,Microsoft.Data.SqlClient.SqlCredential)">
- <param name="connectionString">A connection string that does not use any of the following connection string keywords: <see langword="Integrated Security = true" />, <see langword="UserId" />, or <see langword="Password" />; or that does not use <see langword="ContextConnection = true" />.</param><param name="credential">A <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object. If <paramref name="credential" /> is null, <see cref="M:Microsoft.Data.SqlClient.SqlConnection.#ctor(System.String,Microsoft.Data.SqlClient.SqlCredential)" /> is functionally equivalent to <see cref="M:Microsoft.Data.SqlClient.SqlConnection.#ctor(System.String)" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> class given a connection string, that does not use <see langword="Integrated Security = true" /> and a <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object that contains the user ID and password.</summary><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.AccessToken">
- <summary>Gets or sets the access token for the connection.</summary><value>The access token for the connection.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.ClientConnectionId">
- <summary>The connection ID of the most recent connection attempt, regardless of whether the attempt succeeded or failed.</summary><value>The connection ID of the most recent connection attempt.</value><remarks>
- <format type="text/markdown"><) for certain connection errors. If the connection ID is not in the connection ring buffer, you can assume a network error.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.ConnectionString">
- <summary>Gets or sets the string used to open a SQL Server database.</summary><value>The connection string that includes the source database name, and other parameters needed to establish the initial connection. The default value is an empty string.</value><remarks>
- <format type="text/markdown"><.
-
- The <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A> property can be set only when the connection is closed. Many of the connection string values have corresponding read-only properties. When the connection string is set, these properties are updated, except when an error is detected. In this case, none of the properties are updated. <xref:Microsoft.Data.SqlClient.SqlConnection> properties return only those settings that are contained in the <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A>.
-
- To connect to a local computer, specify "(local)" for the server. If a server name is not specified, a connection will be attempted to the default instance on the local computer.
-
- Resetting the <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A> on a closed connection resets all connection string values (and related properties) including the password. For example, if you set a connection string that includes "Database= AdventureWorks", and then reset the connection string to "Data Source=myserver;Integrated Security=true", the <xref:Microsoft.Data.SqlClient.SqlConnection.Database%2A> property is no longer set to "AdventureWorks".
-
- The connection string is parsed immediately after being set. If errors in syntax are found when parsing, a runtime exception, such as <xref:System.ArgumentException>, is generated. Other errors can be found only when an attempt is made to open the connection.
-
- The basic format of a connection string includes a series of keyword/value pairs separated by semicolons. The equal sign (=) connects each keyword and its value. To include values that contain a semicolon, single-quote character, or double-quote character, the value must be enclosed in double quotation marks. If the value contains both a semicolon and a double-quote character, the value can be enclosed in single quotation marks. The single quotation mark is also useful if the value starts with a double-quote character. Conversely, the double quotation mark can be used if the value starts with a single quotation mark. If the value contains both single-quote and double-quote characters, the quotation mark character used to enclose the value must be doubled every time it occurs within the value.
-
- To include preceding or trailing spaces in the string value, the value must be enclosed in either single quotation marks or double quotation marks. Any leading or trailing spaces around integer, Boolean, or enumerated values are ignored, even if enclosed in quotation marks. However, spaces within a string literal keyword or value are preserved. Single or double quotation marks may be used within a connection string without using delimiters (for example, Data Source= my'Server or Data Source= my"Server), unless a quotation mark character is the first or last character in the value.
-
- Keywords are not case sensitive.
-
- The following table lists the valid names for keyword values within the <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A>.
-
- |Keyword|Default|Description|
- |-------------|-------------|-----------------|
- |Addr|N/A|Synonym of **Data Source**.|
- |Address|N/A|Synonym of **Data Source**.|
- |App|N/A|Synonym of **Application Name**.|
- |Application Name|N/A|The name of the application, or '.NET SQLClient Data Provider' if no application name is provided.<br /><br /> An application name can be 128 characters or less.|
- |ApplicationIntent|ReadWrite|Declares the application workload type when connecting to a server. Possible values are `ReadOnly` and `ReadWrite`. For example:<br /><br /> `ApplicationIntent=ReadOnly`<br /><br /> For more information about SqlClient support for Always On Availability Groups, see [SqlClient Support for High Availability, Disaster Recovery](~/docs/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery.md).|
- |Asynchronous Processing<br /><br /> -or-<br /><br /> Async|'false'|When `true`, enables asynchronous operation support. Recognized values are `true`, `false`, `yes`, and `no`.<br /><br /> This property is ignored beginning in .NET Framework 4.5. For more information about SqlClient support for asynchronous programming, see [Asynchronous Programming](~/docs/framework/data/adonet/asynchronous-programming.md).|
- |AttachDBFilename<br /><br /> -or-<br /><br /> Extended Properties<br /><br /> -or-<br /><br /> Initial File Name|N/A|The name of the primary database file, including the full path name of an attachable database. AttachDBFilename is only supported for primary data files with an .mdf extension.<br /><br /> If the value of the AttachDBFileName key is specified in the connection string, the database is attached and becomes the default database for the connection.<br /><br /> If this key is not specified and if the database was previously attached, the database will not be reattached. The previously attached database will be used as the default database for the connection.<br /><br /> If this key is specified together with the AttachDBFileName key, the value of this key will be used as the alias. However, if the name is already used in another attached database, the connection will fail.<br /><br /> The path may be absolute or relative by using the DataDirectory substitution string. If DataDirectory is used, the database file must exist within a subdirectory of the directory pointed to by the substitution string. **Note:** Remote server, HTTP, and UNC path names are not supported. <br /><br /> The database name must be specified with the keyword 'database' (or one of its aliases) as in the following:<br /><br /> <code>"AttachDbFileName=|DataDirectory|\data\YourDB.mdf;integrated security=true;database=YourDatabase"</code><br /><br /> An error will be generated if a log file exists in the same directory as the data file and the 'database' keyword is used when attaching the primary data file. In this case, remove the log file. Once the database is attached, a new log file will be automatically generated based on the physical path.|
- |Authentication|N/A|The authentication method used for [Connecting to SQL Database By Using Azure Active Directory Authentication](https://azure.microsoft.com/documentation/articles/sql-database-aad-authentication/#7-connect-to-your-database-by-using-azure-active-directory-identities).<br /><br /> Valid values are:<br /><br /> `Active Directory Integrated`, `Active Directory Interactive`, `Active Directory Password`, `Sql Password`. Currently `Active Directory Integrated` and `Active Directory Interactive` modes of authentication are only supported for .NET Framework. |
- |Column Encryption Setting|N/A|Enables or disables [Always Encrypted](/sql/relational-databases/security/encryption/always-encrypted-database-engine?view=sql-server-2017) functionality for the connection.|
- |Connect Timeout<br /><br /> -or-<br /><br /> Connection Timeout<br /><br /> -or-<br /><br /> Timeout|15|The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.<br /><br /> Valid values are greater than or equal to 0 and less than or equal to 2147483647.<br /><br /> When opening a connection to a Azure SQL Database, set the connection timeout to 30 seconds.|
- |Connection Lifetime<br /><br /> -or-<br /><br /> Load Balance Timeout|0|When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by `Connection Lifetime`. This is useful in clustered configurations to force load balancing between a running server and a server just brought online.<br /><br /> A value of zero (0) causes pooled connections to have the maximum connection timeout.|
- |ConnectRetryCount|1|Controls the number of reconnection attempts after the client identifies an idle connection failure. Valid values are 0 to 255. The default is 1. 0 means do not attempt to reconnect (disable connection resiliency).<br /><br /> For additional information about idle connection resiliency, see [Technical Article - Idle Connection Resiliency](https://go.microsoft.com/fwlink/?LinkId=393996).|
- |ConnectRetryInterval|10|Specifies the time between each connection retry attempt (ConnectRetryCount). Valid values are 1 to 60 seconds (default=10), applied after the first reconnection attempt. When a broken connection is detected, the client immediately attempts to reconnect; this is the first reconnection attempt and only occurs if ConnectRetryCount is greater than 0. If the first reconnection attempt fails and ConnectRetryCount is greater than 1, the client waits ConnectRetryInterval to try the second and subsequent reconnection attempts.<br /><br /> For additional information about idle connection resiliency, see [Technical Article - Idle Connection Resiliency](https://go.microsoft.com/fwlink/?LinkId=393996).|
- |Context Connection|'false'|`true` if an in-process connection to SQL Server should be made.|
- |Current Language<br /><br /> -or-<br /><br /> Language|N/A|Sets the language used for database server warning or error messages.<br /><br /> The language name can be 128 characters or less.|
- |Data Source<br /><br /> -or-<br /><br /> Server<br /><br /> -or-<br /><br /> Address<br /><br /> -or-<br /><br /> Addr<br /><br /> -or-<br /><br /> Network Address|N/A|The name or network address of the instance of SQL Server to which to connect. The port number can be specified after the server name:<br /><br /> `server=tcp:servername, portnumber`<br /><br /> When specifying a local instance, always use (local). To force a protocol, add one of the following prefixes:<br /><br /> `np:(local), tcp:(local), lpc:(local)`<br /><br /> Beginning in .NET Framework 4.5, you can also connect to a LocalDB database as follows:<br /><br /> `server=(localdb)\\myInstance`<br /><br /> For more information about LocalDB, see [SqlClient Support for LocalDB](~/docs/framework/data/adonet/sql/sqlclient-support-for-localdb.md).<br /><br /> **Data Source** must use the TCP format or the Named Pipes format.<br /><br /> TCP format is as follows:<br /><br /> - tcp:\<host name>\\<instance name\><br />- tcp:\<host name>,\<TCP/IP port number><br /><br /> The TCP format must start with the prefix "tcp:" and is followed by the database instance, as specified by a host name and an instance name. This format is not applicable when connecting to Azure SQL Database. TCP is automatically selected for connections to Azure SQL Database when no protocol is specified.<br /><br /> The host name MUST be specified in one of the following ways:<br /><br /> - NetBIOSName<br />- IPv4Address<br />- IPv6Address<br /><br /> The instance name is used to resolve to a particular TCP/IP port number on which a database instance is hosted. Alternatively, specifying a TCP/IP port number directly is also allowed. If both instance name and port number are not present, the default database instance is used.<br /><br /> The Named Pipes format is as follows:<br /><br /> - np:\\\\<host name\>\pipe\\<pipe name\><br /><br /> The Named Pipes format MUST start with the prefix "np:" and is followed by a named pipe name.<br /><br /> The host name MUST be specified in one of the following ways:<br /><br /> - NetBIOSName<br />- IPv4Address<br />- IPv6Address<br /><br /> The pipe name is used to identify the database instance to which the .NET Framework application will be connected.<br /><br /> If the value of the **Network** key is specified, the prefixes "tcp:" and "np:" should not be specified. **Note:** You can force the use of TCP instead of shared memory, either by prefixing **tcp:** to the server name in the connection string, or by using **localhost**.|
- |Encrypt|'false'|When `true`, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. Recognized values are `true`, `false`, `yes`, and `no`. For more information, see [Connection String Syntax](~/docs/framework/data/adonet/connection-string-syntax.md).<br /><br /> Beginning in .NET Framework 4.5, when `TrustServerCertificate` is false and `Encrypt` is true, the server name (or IP address) in a SQL Server SSL certificate must exactly match the server name (or IP address) specified in the connection string. Otherwise, the connection attempt will fail. For information about support for certificates whose subject starts with a wildcard character (*), see [Accepted wildcards used by server certificates for server authentication](https://support.microsoft.com/kb/258858).|
- |Enlist|'true'|`true` indicates that the SQL Server connection pooler automatically enlists the connection in the creation thread's current transaction context.|
- |Failover Partner|N/A|The name of the failover partner server where database mirroring is configured.<br /><br /> If the value of this key is "", then **Initial Catalog** must be present, and its value must not be "".<br /><br /> The server name can be 128 characters or less.<br /><br /> If you specify a failover partner but the failover partner server is not configured for database mirroring and the primary server (specified with the Server keyword) is not available, then the connection will fail.<br /><br /> If you specify a failover partner and the primary server is not configured for database mirroring, the connection to the primary server (specified with the Server keyword) will succeed if the primary server is available.|
- |Initial Catalog<br /><br /> -or-<br /><br /> Database|N/A|The name of the database.<br /><br /> The database name can be 128 characters or less.|
- |Integrated Security<br /><br /> -or-<br /><br /> Trusted_Connection|'false'|When `false`, User ID and Password are specified in the connection. When `true`, the current Windows account credentials are used for authentication.<br /><br /> Recognized values are `true`, `false`, `yes`, `no`, and `sspi` (strongly recommended), which is equivalent to `true`.<br /><br /> If User ID and Password are specified and Integrated Security is set to true, the User ID and Password will be ignored and Integrated Security will be used.<br /><br /> <xref:Microsoft.Data.SqlClient.SqlCredential> is a more secure way to specify credentials for a connection that uses SQL Server Authentication (`Integrated Security=false`).|
- |Max Pool Size|100|The maximum number of connections that are allowed in the pool.<br /><br /> Valid values are greater than or equal to 1. Values that are less than **Min Pool Size** generate an error.|
- |Min Pool Size|0|The minimum number of connections that are allowed in the pool.<br /><br /> Valid values are greater than or equal to 0. Zero (0) in this field means no minimum connections are initially opened.<br /><br /> Values that are greater than **Max Pool Size** generate an error.|
- |MultipleActiveResultSets|'false'|When `true`, an application can maintain multiple active result sets (MARS). When `false`, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.<br /><br /> Recognized values are `true` and `false`.<br /><br /> For more information, see [Multiple Active Result Sets (MARS)](~/docs/framework/data/adonet/sql/multiple-active-result-sets-mars.md).|
- |`MultiSubnetFailover`|FALSE|Always specify `multiSubnetFailover=True` when connecting to the availability group listener of a SQL Server 2012 (or later) availability group or a SQL Server 2012 (or later) Failover Cluster Instance. `multiSubnetFailover=True` configures SqlClient to provide faster detection of and connection to the (currently) active server. Possible values are `Yes` and `No`, `True` and `False` or `1` and `0`. For example:<br /><br /> `MultiSubnetFailover=True`<br /><br /> The default is `False`. For more information about SqlClient's support for Always On AGs, see [SqlClient Support for High Availability, Disaster Recovery](~/docs/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery.md).|
- |Network Library<br /><br /> -or-<br /><br /> Network<br /><br /> -or-<br /><br /> Net|N/A|The network library used to establish a connection to an instance of SQL Server. Supported values include:<br /><br /> dbnmpntw (Named Pipes)<br /><br /> dbmsrpcn (Multiprotocol, Windows RPC)<br /><br /> dbmsadsn (Apple Talk)<br /><br /> dbmsgnet (VIA)<br /><br /> dbmslpcn (Shared Memory)<br /><br /> dbmsspxn (IPX/SPX)<br /><br /> dbmssocn (TCP/IP)<br /><br /> Dbmsvinn (Banyan Vines)<br /><br /> The corresponding network DLL must be installed on the system to which you connect. If you do not specify a network and you use a local server (for example, "." or "(local)"), shared memory is used. In this example, the network library is Win32 Winsock TCP/IP (dbmssocn), and 1433 is the port being used.<br /><br /> `Network Library=dbmssocn;Data Source=000.000.000.000,1433;`|
- |Packet Size|8000|Size in bytes of the network packets used to communicate with an instance of SQL Server.<br /><br /> The packet size can be greater than or equal to 512 and less than or equal to 32768.|
- |Password<br /><br /> -or-<br /><br /> PWD|N/A|The password for the SQL Server account logging on. Not recommended. To maintain a high level of security, we strongly recommend that you use the `Integrated Security` or `Trusted_Connection` keyword instead. <xref:Microsoft.Data.SqlClient.SqlCredential> is a more secure way to specify credentials for a connection that uses SQL Server Authentication.<br /><br /> The password must be 128 characters or less.|
- |Persist Security Info<br /><br /> -or-<br /><br /> PersistSecurityInfo|'false'|When set to `false` or `no` (strongly recommended), security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. Resetting the connection string resets all connection string values including the password. Recognized values are `true`, `false`, `yes`, and `no`.|
- |PoolBlockingPeriod|Auto|Sets the blocking period behavior for a connection pool. See <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.PoolBlockingPeriod> property for details.|
- |Pooling|'true'|When the value of this key is set to true, any newly created connection will be added to the pool when closed by the application. In a next attempt to open the same connection, that connection will be drawn from the pool.<br /><br /> Connections are considered the same if they have the same connection string. Different connections have different connection strings.<br /><br /> The value of this key can be "true", "false", "yes", or "no".|
- |Replication|'false'|`true` if replication is supported using the connection.|
- |Transaction Binding|Implicit Unbind|Controls connection association with an enlisted `System.Transactions` transaction.<br /><br /> Possible values are:<br /><br /> `Transaction Binding=Implicit Unbind;`<br /><br /> `Transaction Binding=Explicit Unbind;`<br /><br /> Implicit Unbind causes the connection to detach from the transaction when it ends. After detaching, additional requests on the connection are performed in autocommit mode. The `System.Transactions.Transaction.Current` property is not checked when executing requests while the transaction is active. After the transaction has ended, additional requests are performed in autocommit mode.<br /><br /> If the system ends the transaction (in the scope of a using block) before the last command completes, it will throw <xref:System.InvalidOperationException>.<br /><br /> Explicit Unbind causes the connection to remain attached to the transaction until the connection is closed or an explicit `SqlConnection.TransactionEnlist(null)` is called. Beginning in .NET Framework 4.0, changes to Implicit Unbind make Explicit Unbind obsolete. An `InvalidOperationException` is thrown if `Transaction.Current` is not the enlisted transaction or if the enlisted transaction is not active.|
- |TransparentNetworkIPResolution|See description.|When the value of this key is set to `true`, the application is required to retrieve all IP addresses for a particular DNS entry and attempt to connect with the first one in the list. If the connection is not established within 0.5 seconds, the application will try to connect to all others in parallel. When the first answers, the application will establish the connection with the respondent IP address.<br /><br /> If the `MultiSubnetFailover` key is set to `true`, `TransparentNetworkIPResolution` is ignored.<br /><br /> If the `Failover Partner` key is set, `TransparentNetworkIPResolution` is ignored.<br /><br /> The value of this key must be `true`, `false`, `yes`, or `no`.<br /><br /> A value of `yes` is treated the same as a value of `true`.<br /><br /> A value of `no` is treated the same as a value of `false`.<br /><br /> The default values are as follows:<br /><br /> <ul><li>`false` when:<br /><br /> <ul><li>Connecting to Azure SQL Database where the data source ends with:<br /><br /> <ul><li>.database.chinacloudapi.cn</li><li>.database.usgovcloudapi.net</li><li>.database.cloudapi.de</li><li>.database.windows.net</li></ul></li><li>`Authentication` is 'Active Directory Password' or 'Active Directory Integrated'</li></ul></li><li>`true` in all other cases.</li></ul>|
- |TrustServerCertificate|'false'|When set to `true`, SSL is used to encrypt the channel when bypassing walking the certificate chain to validate trust. If TrustServerCertificate is set to `true` and Encrypt is set to `false`, the channel is not encrypted. Recognized values are `true`, `false`, `yes`, and `no`. For more information, see [Connection String Syntax](~/docs/framework/data/adonet/connection-string-syntax.md).|
- |Type System Version|N/A|A string value that indicates the type system the application expects. The functionality available to a client application is dependent on the version of SQL Server and the compatibility level of the database. Explicitly setting the type system version that the client application was written for avoids potential problems that could cause an application to break if a different version of SQL Server is used. **Note:** The type system version cannot be set for common language runtime (CLR) code executing in-process in SQL Server. For more information, see [SQL Server Common Language Runtime Integration](~/docs/framework/data/adonet/sql/sql-server-common-language-runtime-integration.md). <br /><br /> Possible values are:<br /><br /> `Type System Version=SQL Server 2012;`<br /><br /> `Type System Version=SQL Server 2008;`<br /><br /> `Type System Version=SQL Server 2005;`<br /><br /> `Type System Version=Latest;`<br /><br /> `Type System Version=SQL Server 2012;` specifies that the application will require version 11.0.0.0 of Microsoft.SqlServer.Types.dll. The other `Type System Version` settings will require version 10.0.0.0 of Microsoft.SqlServer.Types.dll.<br /><br /> `Latest` is obsolete and should not be used. `Latest` is equivalent to `Type System Version=SQL Server 2008;`.|
- |User ID<br /><br /> -or-<br /><br /> UID<br /><br /> -or-|N/A|The SQL Server login account. Not recommended. To maintain a high level of security, we strongly recommend that you use the `Integrated Security` or `Trusted_Connection` keywords instead. <xref:Microsoft.Data.SqlClient.SqlCredential> is a more secure way to specify credentials for a connection that uses SQL Server Authentication.<br /><br /> The user ID must be 128 characters or less.|
- |User Instance|'false'|A value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.|
- |Workstation ID<br /><br /> -or-<br /><br /> WSID|The local computer name|The name of the workstation connecting to SQL Server.<br /><br /> The ID must be 128 characters or less.|
-
- The following list contains the valid names for connection pooling values within the <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A>. For more information, see [SQL Server Connection Pooling (ADO.NET)](~/docs/framework/data/adonet/sql-server-connection-pooling.md).
-
- - Connection Lifetime (or Load Balance Timeout)
-
- - Enlist
-
- - Max Pool Size
-
- - Min Pool Size
-
- - Pooling
-
- When you are setting keyword or connection pooling values that require a Boolean value, you can use 'yes' instead of 'true', and 'no' instead of 'false'. Integer values are represented as strings.
- > [!NOTE]
- > The .NET Framework Data Provider for SQL Server uses its own protocol to communicate with SQL Server. Therefore, it does not support the use of an ODBC data source name (DSN) when connecting to SQL Server because it does not add an ODBC layer.
-
- > [!NOTE]
- > Universal data link (UDL) files are not supported for the .NET Framework Data Provider for SQL Server.
-
- > [!CAUTION]
- > In this release, the application should use caution when constructing a connection string based on user input (for example when retrieving user ID and password information from a dialog box, and appending it to the connection string). The application should make sure that a user cannot embed additional connection string parameters in these values (for example, entering a password as "validpassword;database=somedb" in an attempt to attach to a different database). If you need to construct connection strings based on user input, use the new <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder>, which validates the connection string and helps to eliminate this problem. See [Connection String Builders](~/docs/framework/data/adonet/connection-string-builders.md) for more information.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and sets the <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A> property before opening the connection.
-
- [!code-csharp[SqlConnection_ConnectionString Example#1](~/../sqlclient/doc/samples/SqlConnection_ConnectionString.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">An invalid connection string argument has been supplied, or a required connection string argument has not been supplied.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.ConnectionTimeout">
- <summary>Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.</summary><value>The time (in seconds) to wait for a connection to open. The default value is 15 seconds.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The value set is less than 0.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.Credential">
- <summary>Gets or sets the <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object for this connection.</summary><value>The <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object for this connection.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- `Persist Security Info = true` is required to get the value of the <xref:Microsoft.Data.SqlClient.SqlCredential> object with <xref:Microsoft.Data.SqlClient.SqlConnection.Credential%2A>.
-
- The default value of <xref:Microsoft.Data.SqlClient.SqlConnection.Credential%2A> is null.
-
- An <xref:System.InvalidOperationException> exception will be raised:
-
- - If <xref:Microsoft.Data.SqlClient.SqlConnection.Credential%2A> is set on an open connection.
-
- - If <xref:Microsoft.Data.SqlClient.SqlConnection.Credential%2A> is set when `Context Connection=true`.
-
- - If <xref:Microsoft.Data.SqlClient.SqlConnection.Credential%2A> is set when `Integrated Security = true`.
-
- - If <xref:Microsoft.Data.SqlClient.SqlConnection.Credential%2A> is set when the connection string uses `Password`.
-
- - If <xref:Microsoft.Data.SqlClient.SqlConnection.Credential%2A> is set when the connection string uses `UserID`.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.Database">
- <summary>Gets the name of the current database or the database to be used after a connection is opened.</summary><value>The name of the current database or the name of the database to be used after a connection is opened. The default value is an empty string.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.DataSource">
- <summary>Gets the name of the instance of SQL Server to which to connect.</summary><value>The name of the instance of SQL Server to which to connect. The default value is an empty string.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
-
- > [!NOTE]
- > The <xref:Microsoft.Data.SqlClient.SqlConnection.DataSource%2A> property returns `null` if the connection string for the <xref:Microsoft.Data.SqlClient.SqlConnection> is "context connection=true".
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and displays some of its read-only properties.
-
- [!code-csharp[SqlConnection_DataSource Example#1](~/../sqlclient/doc/samples/SqlConnection_DataSource.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.FireInfoMessageEventOnUserErrors">
- <summary>Gets or sets the <see cref="P:Microsoft.Data.SqlClient.SqlConnection.FireInfoMessageEventOnUserErrors" /> property.</summary><value>
- <see langword="true" /> if the <see cref="P:Microsoft.Data.SqlClient.SqlConnection.FireInfoMessageEventOnUserErrors" /> property has been set; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- When you set <xref:Microsoft.Data.SqlClient.SqlConnection.FireInfoMessageEventOnUserErrors%2A> to `true`, errors that were previously treated as exceptions are now handled as <xref:Microsoft.Data.SqlClient.SqlConnection.InfoMessage> events. All events fire immediately and are handled by the event handler. If is <xref:Microsoft.Data.SqlClient.SqlConnection.FireInfoMessageEventOnUserErrors%2A> is set to `false`, then <xref:Microsoft.Data.SqlClient.SqlConnection.InfoMessage> events are handled at the end of the procedure.
-
- > [!NOTE]
- > An error with a severity level of 17 or above that causes the server to stop processing the command needs to be handled as an exception. In this case, an exception is thrown regardless of how the error is handled in the <xref:Microsoft.Data.SqlClient.SqlConnection.InfoMessage> event.
-
- For more information on working with events, see [Connection Events](~/docs/framework/data/adonet/connection-events.md). For more information on errors generated by the SQL Server engine, see [Database Engine Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors).
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.PacketSize">
- <summary>Gets the size (in bytes) of network packets used to communicate with an instance of SQL Server.</summary><value>The size (in bytes) of network packets. The default value is 8000.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection>, including setting the `Packet Size` to 512 in the connection string. It displays the <xref:Microsoft.Data.SqlClient.SqlConnection.PacketSize%2A> and <xref:Microsoft.Data.SqlClient.SqlConnection.ServerVersion%2A> properties in the console window.
-
- [!code-csharp[SqlConnection_PacketSize Example#1](~/../sqlclient/doc/samples/SqlConnection_PacketSize.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.ServerVersion">
- <summary>Gets a string that contains the version of the instance of SQL Server to which the client is connected.</summary><value>The version of the instance of SQL Server.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The connection is closed.
-
- <see cref="P:Microsoft.Data.SqlClient.SqlConnection.ServerVersion" /> was called while the returned Task was not completed and the connection was not opened after a call to <see cref="M:Microsoft.Data.SqlClient.SqlConnection.OpenAsync(System.Threading.CancellationToken)" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.State">
- <summary>Indicates the state of the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> during the most recent network operation performed on the connection.</summary><value>An <see cref="T:System.Data.ConnectionState" /> enumeration.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Returns an <xref:System.Data.ConnectionState> enumeration indicating the state of the <xref:Microsoft.Data.SqlClient.SqlConnection>. Closing and reopening the connection will refresh the value of <xref:Microsoft.Data.SqlClient.SqlConnection.State%2A>.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.StatisticsEnabled">
- <summary>When set to <see langword="true" />, enables statistics gathering for the current connection.</summary><value>Returns <see langword="true" /> if statistics gathering is enabled; otherwise <see langword="false" />. <see langword="false" /> is the default.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Enabling statistics gathering has a minor, but measurable effect on performance and therefore should be enabled only when it is required.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnection.WorkstationId">
- <summary>Gets a string that identifies the database client.</summary><value>A string that identifies the database client. If not specified, the name of the client computer. If neither is specified, the value is an empty string.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="E:Microsoft.Data.SqlClient.SqlConnection.InfoMessage">
- <summary>Occurs when SQL Server returns a warning or informational message.</summary><remarks>
- <format type="text/markdown"><.
-
- For more information and an example, see [Connection Events](~/docs/framework/data/adonet/connection-events.md).
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.BeginDbTransaction(System.Data.IsolationLevel)">
- <param name="isolationLevel">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction">
- <summary>Starts a database transaction.</summary><returns>An object representing the new transaction.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This command maps to the SQL Server implementation of BEGIN TRANSACTION.
-
- You must explicitly commit or roll back the transaction using the <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A> or <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> method. To make sure that the .NET Framework Data Provider for SQL Server transaction management model performs correctly, avoid using other transaction management models, such as the one provided by SQL Server.
-
- > [!NOTE]
- > If you do not specify an isolation level, the default isolation level is used. To specify an isolation level with the <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A> method, use the overload that takes the `iso` parameter (<xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>). The isolation level set for a transaction persists after the transaction is completed and until the connection is closed or disposed. Setting the isolation level to **Snapshot** in a database where the snapshot isolation level is not enabled does not throw an exception. The transaction will complete using the default isolation level.
-
- > [!CAUTION]
- > If a transaction is started and a level 16 or higher error occurs on the server, the transaction will not be rolled back until the <xref:Microsoft.Data.SqlClient.SqlDataReader.Read%2A> method is invoked. No exception is thrown on **ExecuteReader**.
-
- > [!CAUTION]
- > When your query returns a large amount of data and calls `BeginTransaction`, a <xref:Microsoft.Data.SqlClient.SqlException> is thrown because SQL Server does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open.
-
- For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql).
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlTransaction>. It also demonstrates how to use the <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>, a <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A>, and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> methods.
-
- [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:Microsoft.Data.SqlClient.SqlException">Parallel transactions are not allowed when using Multiple Active Result Sets (MARS).</exception><exception cref="T:System.InvalidOperationException">Parallel transactions are not supported.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction(System.Data.IsolationLevel)">
- <param name="iso">The isolation level under which the transaction should run.</param><summary>Starts a database transaction with the specified isolation level.</summary><returns>An object representing the new transaction.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This command maps to the SQL Server implementation of BEGIN TRANSACTION.
-
- You must explicitly commit or roll back the transaction using the <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A> or <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> method. To make sure that the .NET Framework Data Provider for SQL Server transaction management model performs correctly, avoid using other transaction management models, such as the one provided by SQL Server.
-
- > [!NOTE]
- > After a transaction is committed or rolled back, the isolation level of the transaction persists for all subsequent commands that are in autocommit mode (the SQL Server default). This can produce unexpected results, such as an isolation level of REPEATABLE READ persisting and locking other users out of a row. To reset the isolation level to the default (READ COMMITTED), execute the Transact-SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED statement, or call <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A?displayProperty=nameWithType> followed immediately by <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A?displayProperty=nameWithType>. For more information on SQL Server isolation levels, see [Transaction Isolation Levels](/sql/t-sql/language-elements/transaction-isolation-levels).
-
- For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql).
-
- > [!CAUTION]
- > When your query returns a large amount of data and calls `BeginTransaction`, a <xref:Microsoft.Data.SqlClient.SqlException> is thrown because SQL Server does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlTransaction>. It also demonstrates how to use the <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>, a <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A>, and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> methods.
-
- [!code-csharp[SqlConnection_BeginTransaction1 Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction1.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:Microsoft.Data.SqlClient.SqlException">Parallel transactions are not allowed when using Multiple Active Result Sets (MARS).</exception><exception cref="T:System.InvalidOperationException">Parallel transactions are not supported.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction(System.Data.IsolationLevel,System.String)">
- <param name="iso">The isolation level under which the transaction should run.</param><param name="transactionName">The name of the transaction.</param><summary>Starts a database transaction with the specified isolation level and transaction name.</summary><returns>An object representing the new transaction.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This command maps to the SQL Server implementation of BEGIN TRANSACTION.
-
- The value in the `transactionName` parameter can be used in later calls to <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> and in the `savePoint` parameter of the <xref:Microsoft.Data.SqlClient.SqlTransaction.Save%2A> method.
-
- You must explicitly commit or roll back the transaction using the <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A> or <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> method. To make sure that the SQL Server transaction management model performs correctly, avoid using other transaction management models, such as the one provided by SQL Server.
-
- > [!NOTE]
- > After a transaction is committed or rolled back, the isolation level of the transaction persists for all subsequent commands that are in autocommit mode (the SQL Server default). This can produce unexpected results, such as an isolation level of REPEATABLE READ persisting and locking other users out of a row. To reset the isolation level to the default (READ COMMITTED), execute the Transact-SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED statement, or call <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A?displayProperty=nameWithType> followed immediately by <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A?displayProperty=nameWithType>. For more information on SQL Server isolation levels, see [Transaction Isolation Levels](/sql/t-sql/language-elements/transaction-isolation-levels).
-
- For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql).
-
- > [!CAUTION]
- > When your query returns a large amount of data and calls `BeginTransaction`, a <xref:Microsoft.Data.SqlClient.SqlException> is thrown because SQL Server does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlTransaction>. It also demonstrates how to use the <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>, a <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A>, and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> methods.
-
- [!code-csharp[SqlConnection_BeginTransaction3 Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction3.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:Microsoft.Data.SqlClient.SqlException">Parallel transactions are not allowed when using Multiple Active Result Sets (MARS).</exception><exception cref="T:System.InvalidOperationException">Parallel transactions are not supported.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction(System.String)">
- <param name="transactionName">The name of the transaction.</param><summary>Starts a database transaction with the specified transaction name.</summary><returns>An object representing the new transaction.</returns><remarks>
- <format type="text/markdown"><.
-
- > [!CAUTION]
- > When your query returns a large amount of data and calls `BeginTransaction`, a <xref:Microsoft.Data.SqlClient.SqlException> is thrown because SQL Server does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlTransaction>. It also demonstrates how to use the <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>, a <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A>, and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> methods.
-
- [!code-csharp[SqlConnection_BeginTransaction2 Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction2.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:Microsoft.Data.SqlClient.SqlException">Parallel transactions are not allowed when using Multiple Active Result Sets (MARS).</exception><exception cref="T:System.InvalidOperationException">Parallel transactions are not supported.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.ChangeDatabase(System.String)">
- <param name="database">The name of the database to use instead of the current database.</param><summary>Changes the current database for an open <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The database name is not valid.</exception><exception cref="T:System.InvalidOperationException">The connection is not open.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">Cannot change the database.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.ChangePassword(System.String,Microsoft.Data.SqlClient.SqlCredential,System.Security.SecureString)">
- <param name="connectionString">The connection string that contains enough information to connect to a server. The connection string should not use any of the following connection string keywords: <see langword="Integrated Security = true" />, <see langword="UserId" />, or <see langword="Password" />; or <see langword="ContextConnection = true" />.</param><param name="credential">A <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object.</param><param name="newSecurePassword">The new password. <paramref name="newSecurePassword" /> must be read only. The password must also comply with any password security policy set on the server (for example, minimum length and requirements for specific characters).</param><summary>Changes the SQL Server password for the user indicated in the <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- The connection string contains any combination of <see langword="UserId" />, <see langword="Password" />, or <see langword="Integrated Security=true" />.
- -or-
-
- The connection string contains <see langword="Context Connection=true" />.
- -or-
- <paramref name="newSecurePassword" /> is greater than 128 characters.
- -or-
- <paramref name="newSecurePassword" /> is not read only.
- -or-
- <paramref name="newSecurePassword" /> is an empty string.</exception><exception cref="T:System.ArgumentNullException">One of the parameters (<paramref name="connectionString" />, <paramref name="credential" />, or <paramref name="newSecurePassword" />) is null.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.ChangePassword(System.String,System.String)">
- <param name="connectionString">The connection string that contains enough information to connect to the server that you want. The connection string must contain the user ID and the current password.</param><param name="newPassword">The new password to set. This password must comply with any password security policy set on the server, including minimum length, requirements for specific characters, and so on.</param><summary>Changes the SQL Server password for the user indicated in the connection string to the supplied new password.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- When you are using SQL Server on Windows Server, developers can take advantage of functionality that lets the client application supply both the current and a new password in order to change the existing password. Applications can implement functionality such as prompting the user for a new password during initial login if the old one has expired, and this operation can be completed without administrator intervention.
-
- The <xref:Microsoft.Data.SqlClient.SqlConnection.ChangePassword%2A> method changes the SQL Server password for the user indicated in the supplied `connectionString` parameter to the value supplied in the `newPassword` parameter. If the connection string includes the option for integrated security (that is, "Integrated Security=True" or the equivalent), an exception is thrown.
-
- To determine that the password has expired, calling the <xref:Microsoft.Data.SqlClient.SqlConnection.Open%2A> method raises a <xref:Microsoft.Data.SqlClient.SqlException>. In order to indicate that the password that is contained within the connection string must be reset, the <xref:Microsoft.Data.SqlClient.SqlException.Number%2A> property for the exception contains the status value 18487 or 18488. The first value (18487) indicates that the password has expired and the second (18488) indicates that the password must be reset before logging in.
-
- This method opens its own connection to the server, requests the password change, and closes the connection as soon as it has completed. This connection is not retrieved from, nor returned to, the SQL Server connection pool.
-
-
-
- ## Examples
- The following is a simple example of changing a password:
-
- ```csharp
- class Program {
- static void Main(string[] args) {
- Microsoft.Data.SqlClient.SqlConnection.ChangePassword(
- "Data Source=a_server;Initial Catalog=a_database;UID=user;PWD=old_password",
- "new_password");
- }
- }
-
- ```
-
- ```vb
- Module Module1
- Sub Main()
- Microsoft.Data.SqlClient.SqlConnection.ChangePassword(
- "Data Source=a_server;Initial Catalog=a_database;UID=user;PWD=old_password",
- "new_password")
- End Sub
- End Module
-
- ```
-
- The following console application demonstrates the issues involved in changing a user's password because the current password has expired.
-
- [!code-csharp[SqlConnection_ConnectionString1#1](~/../sqlclient/doc/samples/SqlConnection_ConnectionString1.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The connection string includes the option to use integrated security.
-
- Or
-
- The <paramref name="newPassword" /> exceeds 128 characters.</exception><exception cref="T:System.ArgumentNullException">Either the <paramref name="connectionString" /> or the <paramref name="newPassword" /> parameter is null.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.ClearAllPools">
- <summary>Empties the connection pool.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlConnection.ClearAllPools%2A> resets (or empties) the connection pool. If there are connections in use at the time of the call, they are marked appropriately and will be discarded (instead of being returned to the pool) when <xref:Microsoft.Data.SqlClient.SqlConnection.Close%2A> is called on them.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.ClearPool(Microsoft.Data.SqlClient.SqlConnection)">
- <param name="connection">The <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> to be cleared from the pool.</param><summary>Empties the connection pool associated with the specified connection.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlConnection.ClearPool%2A> clears the connection pool that is associated with the `connection`. If additional connections associated with `connection` are in use at the time of the call, they are marked appropriately and are discarded (instead of being returned to the pool) when <xref:Microsoft.Data.SqlClient.SqlConnection.Close%2A> is called on them.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.Close">
- <summary>Closes the connection to the database. This is the preferred method of closing any open connection.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlConnection.Close%2A> method rolls back any pending transactions. It then releases the connection to the connection pool, or closes the connection if connection pooling is disabled.
-
- > [!NOTE]
- > Pending transactions started using Transact-SQL or <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A> are automatically rolled back when the connection is reset if connection pooling is enabled. If connection pooling is off, the transaction is rolled back after `SqlConnection.Close` is called. Transactions started through <xref:System.Transactions> are controlled through the `System.Transactions` infrastructure, and are not affected by `SqlConnection.Close`.
-
- An application can call <xref:Microsoft.Data.SqlClient.SqlConnection.Close%2A> more than one time. No exception is generated.
-
- If the <xref:Microsoft.Data.SqlClient.SqlConnection> goes out of scope, it won't be closed. Therefore, you must explicitly close the connection by calling `Close` or `Dispose`. `Close` and `Dispose` are functionally equivalent. If the connection pooling value `Pooling` is set to `true` or `yes`, the underlying connection is returned back to the connection pool. On the other hand, if `Pooling` is set to `false` or `no`, the underlying connection to the server is closed.
-
- > [!NOTE]
- > Login and logout events will not be raised on the server when a connection is fetched from or returned to the connection pool, because the connection is not actually closed when it is returned to the connection pool. For more information, see [SQL Server Connection Pooling (ADO.NET)](~/docs/framework/data/adonet/sql-server-connection-pooling.md).
-
- > [!CAUTION]
- > Do not call `Close` or `Dispose` on a Connection, a DataReader, or any other managed object in the `Finalize` method of your class. In a finalizer, you should only release unmanaged resources that your class owns directly. If your class does not own any unmanaged resources, do not include a `Finalize` method in your class definition. For more information, see [Garbage Collection](~/docs/standard/garbage-collection/index.md).
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection>, opens it, displays some of its properties. The connection is automatically closed at the end of the `using` block.
-
- [!code-csharp[SqlConnection_Open Example#1](~/../sqlclient/doc/samples/SqlConnection_Open.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:Microsoft.Data.SqlClient.SqlException">The connection-level error that occurred while opening the connection.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.CreateCommand">
- <summary>Creates and returns a <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object associated with the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />.</summary><returns>A <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object.</returns><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.CreateDbCommand">
- <summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.GetSchema">
- <summary>Returns schema information for the data source of this <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />. For more information about scheme, see [SQL Server Schema Collections](~/docs/framework/data/adonet/sql-server-schema-collections.md).</summary><returns>A <see cref="T:System.Data.DataTable" /> that contains schema information.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.GetSchema(System.String)">
- <param name="collectionName">Specifies the name of the schema to return.</param><summary>Returns schema information for the data source of this <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> using the specified string for the schema name.</summary><returns>A <see cref="T:System.Data.DataTable" /> that contains schema information.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- You may need the schema information of the database, tables or columns. This sample:
-
- - Uses GetSchema to get schema information.
-
- - Use schema restrictions to get the specified information.
-
- - Gets schema information of the database, tables, and some columns.
-
- Before you run the sample, you need to create the sample database, using the following Transact-SQL:
-
- ```
- USE [master]
- GO
-
- CREATE DATABASE [MySchool]
-
- GO
-
- USE [MySchool]
- GO
-
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Course]([CourseID] [nvarchar](10) NOT NULL,
- [Year] [smallint] NOT NULL,
- [Title] [nvarchar](100) NOT NULL,
- [Credits] [int] NOT NULL,
- [DepartmentID] [int] NOT NULL,
- CONSTRAINT [PK_Course] PRIMARY KEY CLUSTERED
- (
- [CourseID] ASC,
- [Year] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]
-
- GO
-
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Department]([DepartmentID] [int] IDENTITY(1,1) NOT NULL,
- [Name] [nvarchar](50) NOT NULL,
- [Budget] [money] NOT NULL,
- [StartDate] [datetime] NOT NULL,
- [Administrator] [int] NULL,
- CONSTRAINT [PK_Department] PRIMARY KEY CLUSTERED
- (
- [DepartmentID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]
-
- GO
-
- INSERT [dbo].[Course] ([CourseID], [Year], [Title], [Credits], [DepartmentID]) VALUES (N'C1045', 2012, N'Calculus', 4, 7)
- INSERT [dbo].[Course] ([CourseID], [Year], [Title], [Credits], [DepartmentID]) VALUES (N'C1061', 2012, N'Physics', 4, 1)
- INSERT [dbo].[Course] ([CourseID], [Year], [Title], [Credits], [DepartmentID]) VALUES (N'C2021', 2012, N'Composition', 3, 2)
- INSERT [dbo].[Course] ([CourseID], [Year], [Title], [Credits], [DepartmentID]) VALUES (N'C2042', 2012, N'Literature', 4, 2)
-
- SET IDENTITY_INSERT [dbo].[Department] ON
-
- INSERT [dbo].[Department] ([DepartmentID], [Name], [Budget], [StartDate], [Administrator]) VALUES (1, N'Engineering', 350000.0000, CAST(0x0000999C00000000 AS DateTime), 2)
- INSERT [dbo].[Department] ([DepartmentID], [Name], [Budget], [StartDate], [Administrator]) VALUES (2, N'English', 120000.0000, CAST(0x0000999C00000000 AS DateTime), 6)
- INSERT [dbo].[Department] ([DepartmentID], [Name], [Budget], [StartDate], [Administrator]) VALUES (4, N'Economics', 200000.0000, CAST(0x0000999C00000000 AS DateTime), 4)
- INSERT [dbo].[Department] ([DepartmentID], [Name], [Budget], [StartDate], [Administrator]) VALUES (7, N'Mathematics', 250024.0000, CAST(0x0000999C00000000 AS DateTime), 3)
- SET IDENTITY_INSERT [dbo].[Department] OFF
-
- ALTER TABLE [dbo].[Course] WITH CHECK ADD CONSTRAINT [FK_Course_Department] FOREIGN KEY([DepartmentID])
- REFERENCES [dbo].[Department] ([DepartmentID])
- GO
- ALTER TABLE [dbo].[Course] CHECK CONSTRAINT [FK_Course_Department]
- GO
- ```
-
- [How to Get Schema Information from Database](https://code.msdn.microsoft.com/How-to-Get-Schema-b66d62e2) has C# and Visual Basic versions of this code sample in a Visual Studio project.
-
- [!code-csharp[SqlConnection.GetSchema#1](~/../sqlclient/doc/samples/SqlConnection_GetSchema.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">
- <paramref name="collectionName" /> is specified as null.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.GetSchema(System.String,System.String[])">
- <param name="collectionName">Specifies the name of the schema to return.</param><param name="restrictionValues">A set of restriction values for the requested schema.</param><summary>Returns schema information for the data source of this <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> using the specified string for the schema name and the specified string array for the restriction values.</summary><returns>A <see cref="T:System.Data.DataTable" /> that contains schema information.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The `restrictionValues` parameter can supply *n* depth of values, which are specified by the restrictions collection for a specific collection. In order to set values on a given restriction, and not set the values of other restrictions, you need to set the preceding restrictions to `null` and then put the appropriate value in for the restriction that you would like to specify a value for.
-
- An example of this is the "Tables" collection. If the "Tables" collection has three restrictions--database, owner, and table name--and you want to get back only the tables associated with the owner "Carl", you need to pass in the following values: null, "Carl". If a restriction value is not passed in, the default values are used for that restriction. This is the same mapping as passing in `null`, which is different from passing in an empty string for the parameter value. In that case, the empty string ("") is considered to be the value for the specified parameter.
-
- For a code sample demonstrating <xref:Microsoft.Data.SqlClient.SqlConnection.GetSchema%2A>, see <xref:Microsoft.Data.SqlClient.SqlConnection.GetSchema%2A>.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">
- <paramref name="collectionName" /> is specified as null.</exception><altmember cref="M:Microsoft.Data.SqlClient.SqlConnection.GetSchema" />
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.Open">
- <summary>Opens a database connection with the property settings specified by the <see cref="P:Microsoft.Data.SqlClient.SqlConnection.ConnectionString" />.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlConnection> draws an open connection from the connection pool if one is available. Otherwise, it establishes a new connection to an instance of SQL Server.
-
- > [!NOTE]
- > If the <xref:Microsoft.Data.SqlClient.SqlConnection> goes out of scope, it is not closed. Therefore, you must explicitly close the connection by calling <xref:Microsoft.Data.SqlClient.SqlConnection.Close%2A>.
-
- > [!NOTE]
- > If you specify a port number other than 1433 when you are trying to connect to an instance of SQL Server and using a protocol other than TCP/IP, the <xref:Microsoft.Data.SqlClient.SqlConnection.Open%2A> method fails. To specify a port number other than 1433, include "server=machinename,port number" in the connection string, and use the TCP/IP protocol.
-
- > [!NOTE]
- > The .NET Framework Data Provider for SQL Server requires the Security permission with "Allows calls to unmanaged assemblies" enabled (<xref:System.Security.Permissions.SecurityPermission> with <xref:System.Security.Permissions.SecurityPermissionFlag> set to `UnmanagedCode`) to open a <xref:Microsoft.Data.SqlClient.SqlConnection> with SQL Debugging enabled.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection>, opens it, and displays some of its properties. The connection is automatically closed at the end of the `using` block.
-
- [!code-csharp[SqlConnection_Open Example#1](~/../sqlclient/doc/samples/SqlConnection_Open.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">Cannot open a connection without specifying a data source or server.
-
- or
-
- The connection is already open.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">A connection-level error occurred while opening the connection. If the <see cref="P:Microsoft.Data.SqlClient.SqlException.Number" /> property contains the value 18487 or 18488, this indicates that the specified password has expired or must be reset. See the <see cref="M:Microsoft.Data.SqlClient.SqlConnection.ChangePassword(System.String,System.String)" /> method for more information.
-
- The <see langword="<system.data.localdb>" /> tag in the app.config file has invalid or unknown elements.</exception><exception cref="T:System.Configuration.ConfigurationErrorsException">There are two entries with the same name in the <see langword="<localdbinstances>" /> section.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.OpenAsync(System.Threading.CancellationToken)">
- <param name="cancellationToken">The cancellation instruction.</param><summary>An asynchronous version of <see cref="M:Microsoft.Data.SqlClient.SqlConnection.Open" />, which opens a database connection with the property settings specified by the <see cref="P:Microsoft.Data.SqlClient.SqlConnection.ConnectionString" />. The cancellation token can be used to request that the operation be abandoned before the connection timeout elapses. Exceptions will be propagated via the returned Task. If the connection timeout time elapses without successfully connecting, the returned Task will be marked as faulted with an Exception. The implementation returns a Task without blocking the calling thread for both pooled and non-pooled connections.</summary><returns>A task representing the asynchronous operation.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">Calling <see cref="M:Microsoft.Data.SqlClient.SqlConnection.OpenAsync(System.Threading.CancellationToken)" /> more than once for the same instance before task completion.
-
- <see langword="Context Connection=true" /> is specified in the connection string.
-
- A connection was not available from the connection pool before the connection time out elapsed.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">Any error returned by SQL Server that occurred while opening the connection.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.ResetStatistics">
- <summary>If statistics gathering is enabled, all values are reset to zero.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- If statistics gathering is not enabled and this method is called, no error is thrown.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.RetrieveStatistics">
- <summary>Returns a name value pair collection of statistics at the point in time the method is called.</summary><returns>Returns a reference of type <see cref="T:System.Collections.IDictionary" /> of <see cref="T:System.Collections.DictionaryEntry" /> items.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- When this method is called, the values retrieved are those at the current point in time. If you continue using the connection, the values are incorrect. You need to re-execute the method to obtain the most current values.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnection.Dispose(System.Boolean)">
- <param name="disposing">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder">
- <summary>Provides a simple way to create and manage the contents of connection strings used by the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> class.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The connection string builder lets developers programmatically create syntactically correct connection strings, and parse and rebuild existing connection strings, using properties and methods of the class. The connection string builder provides strongly typed properties corresponding to the known key/value pairs allowed by SQL Server. Developers needing to create connection strings as part of applications can use the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> class to build and modify connection strings. The class also makes it easy to manage connection strings stored in an application configuration file.
-
- The <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> performs checks for valid key/value pairs. Therefore, you cannot use this class to create invalid connection strings; trying to add invalid pairs will throw an exception. The class maintains a fixed collection of synonyms and can translate from a synonym to the corresponding well-known key name.
-
- For example, when you use the **Item** property to retrieve a value, you can specify a string that contains any synonym for the key you need. For example, you can specify "Network Address", "addr", or any other acceptable synonym for this key within a connection string when you use any member that requires a string that contains the key name, such as the **Item** property or the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Remove%2A> method. See the <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A> property for a full list of acceptable synonyms.
-
- The **Item** property handles tries to insert malicious entries. For example, the following code, using the default Item property (the indexer, in C#) correctly escapes the nested key/value pair:
-
- ```vb
- Dim builder As New Microsoft.Data.SqlClient.SqlConnectionStringBuilder
- builder("Data Source") = "(local)"
- builder("Integrated Security") = True
- builder("Initial Catalog") = "AdventureWorks;NewValue=Bad"
- Console.WriteLine(builder.ConnectionString)
- ```
-
- ```csharp
- Microsoft.Data.SqlClient.SqlConnectionStringBuilder builder =
- new Microsoft.Data.SqlClient.SqlConnectionStringBuilder();
- builder["Data Source"] = "(local)";
- builder["Integrated Security"] = true;
- builder["Initial Catalog"] = "AdventureWorks;NewValue=Bad";
- Console.WriteLine(builder.ConnectionString);
-
- ```
-
- The result is the following connection string that handles the invalid value in a safe manner:
-
- ```
- Source=(local);Initial Catalog="AdventureWorks;NewValue=Bad";
- Integrated Security=True
- ```
-
-
-
- ## Examples
- The following console application builds connection strings for a SQL Server database. The code uses a <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> class to create the connection string, and then passes the <xref:System.Data.Common.DbConnectionStringBuilder.ConnectionString%2A> property of the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> instance to the constructor of the connection class. The example also parses an existing connection string and demonstrates various ways of manipulating the connection string's contents.
-
- > [!NOTE]
- > This example includes a password to demonstrate how <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application.
-
- [!code-csharp[SqlConnectionStringBuilder#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.#ctor">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> class.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.#ctor(System.String)">
- <param name="connectionString">The basis for the object's internal connection information. Parsed into name/value pairs. Invalid key names raise <see cref="T:System.Collections.Generic.KeyNotFoundException" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> class. The provided connection string provides the data for the instance's internal connection information.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> class provides a fixed internal collection of key/value pairs. Even if you supply only a small subset of the possible connection string values in the constructor, the object always provides default values for each key/value pair. When the `ConnectionString` property of the object is retrieved, the string contains only key/value pairs in which the value is not the default value for the item.
-
-
-
- ## Examples
- The following example supplies a simple SQL Server connection string in the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> object's constructor, and then iterates through all the key/value pairs within the object. Note that the collection provides default values for each item. Also note that the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> class converts synonyms for the well-known keys so that they are consistent with the well-known names.
-
- > [!NOTE]
- > This example includes a password to demonstrate how <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application.
-
- [!code-csharp[SqlConnectionStringBuilder3#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder3.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:System.Collections.Generic.KeyNotFoundException">Invalid key name within the connection string.</exception><exception cref="T:System.FormatException">Invalid value within the connection string (specifically, when a Boolean or numeric value was expected but not supplied).</exception><exception cref="T:System.ArgumentException">The supplied <paramref name="connectionString" /> is not valid.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ApplicationIntent">
- <summary>Declares the application workload type when connecting to a database in an SQL Server Availability Group. You can set the value of this property with <see cref="T:Microsoft.Data.SqlClient.ApplicationIntent" />. For more information about SqlClient support for Always On Availability Groups, see [SqlClient Support for High Availability, Disaster Recovery](~/docs/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery.md).</summary><value>Returns the current value of the property (a value of type <see cref="T:Microsoft.Data.SqlClient.ApplicationIntent" />).</value><remarks>To be added.</remarks><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">ADO.NET Overview</related>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ApplicationName">
- <summary>Gets or sets the name of the application associated with the connection string.</summary><value>The name of the application, or ".NET SqlClient Data Provider" if no name has been supplied.</value><remarks>
- <format type="text/markdown"><]
-
- The sample displays the following text in the console window:
-
- ```
- Original: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True
- ApplicationName=".Net SqlClient Data Provider"
- Modified: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True;Application Name="My Application"
- ```
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.AttachDBFilename">
- <summary>Gets or sets a string that contains the name of the primary data file. This includes the full path name of an attachable database.</summary><value>The value of the <see langword="AttachDBFilename" /> property, or <see langword="String.Empty" /> if no value has been supplied.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception><related type="Article" href="https://msdn.microsoft.com/library/745c5f95-2f02-4674-b378-6d51a7ec2490">Working with Connection Strings</related><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">ADO.NET Overview</related>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Authentication">
- <summary>Gets the authentication of the connection string.</summary><value>The authentication of the connection string.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ConnectRetryCount">
- <summary>The number of reconnections attempted after identifying that there was an idle connection failure. This must be an integer between 0 and 255. Default is 1. Set to 0 to disable reconnecting on idle connection failures. An <see cref="T:System.ArgumentException" /> will be thrown if set to a value outside of the allowed range.</summary><value>The number of reconnections attempted after identifying that there was an idle connection failure.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ConnectRetryInterval">
- <summary>Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure. This must be an integer between 1 and 60. The default is 10 seconds. An <see cref="T:System.ArgumentException" /> will be thrown if set to a value outside of the allowed range.</summary><value>Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ConnectTimeout">
- <summary>Gets or sets the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ConnectTimeout" /> property, or 15 seconds if no value has been supplied.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.CurrentLanguage">
- <summary>Gets or sets the SQL Server Language record name.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.CurrentLanguage" /> property, or <see langword="String.Empty" /> if no value has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Current Language" and "language" keys within the connection string.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.DataSource">
- <summary>Gets or sets the name or network address of the instance of SQL Server to connect to.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.DataSource" /> property, or <see langword="String.Empty" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Encrypt">
- <summary>Gets or sets a Boolean value that indicates whether SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Encrypt" /> property, or <see langword="false" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Encrypt" key within the connection string.
-
- ]]></format>
- </remarks><related type="Article" href="https://msdn.microsoft.com/library/745c5f95-2f02-4674-b378-6d51a7ec2490">Working with Connection Strings</related><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">ADO.NET Overview</related>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Enlist">
- <summary>Gets or sets a Boolean value that indicates whether the SQL Server connection pooler automatically enlists the connection in the creation thread's current transaction context.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Enlist" /> property, or <see langword="true" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Enlist" key within the connection string.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.FailoverPartner">
- <summary>Gets or sets the name or address of the partner server to connect to if the primary server is down.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.FailoverPartner" /> property, or <see langword="String.Empty" /> if none has been supplied.</value><remarks>To be added.</remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.InitialCatalog">
- <summary>Gets or sets the name of the database associated with the connection.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.InitialCatalog" /> property, or <see langword="String.Empty" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.IntegratedSecurity">
- <summary>Gets or sets a Boolean value that indicates whether User ID and Password are specified in the connection (when <see langword="false" />) or whether the current Windows account credentials are used for authentication (when <see langword="true" />).</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.IntegratedSecurity" /> property, or <see langword="false" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Integrated Security" and "trusted_connection" keys within the connection string.
-
-
-
- ## Examples
- The following example converts an existing connection string from using SQL Server Authentication to using integrated security. The example does its work by removing the user name and password from the connection string and then setting the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.IntegratedSecurity%2A> property of the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> object.
-
- > [!NOTE]
- > This example includes a password to demonstrate how <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application.
-
- [!code-csharp[SqlConnectionStringBuilder_IntegratedSecurity#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_IntegratedSecurity.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.IsFixedSize">
- <summary>Gets a value that indicates whether the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> has a fixed size.</summary><value>
- <see langword="true" /> in every case, because the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> supplies a fixed-size collection of key/value pairs.</value><remarks>To be added.</remarks><related type="Article" href="https://msdn.microsoft.com/library/745c5f95-2f02-4674-b378-6d51a7ec2490">Working with Connection Strings</related><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">ADO.NET Overview</related>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Item(System.String)">
- <param name="keyword">The key of the item to get or set.</param><summary>Gets or sets the value associated with the specified key. In C#, this property is the indexer.</summary><value>The value associated with the specified key.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="keyword" /> is a null reference (<see langword="Nothing" /> in Visual Basic).</exception><exception cref="T:System.Collections.Generic.KeyNotFoundException">Tried to add a key that does not exist within the available keys.</exception><exception cref="T:System.FormatException">Invalid value within the connection string (specifically, a Boolean or numeric value was expected but not supplied).</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Keys">
- <summary>Gets an <see cref="T:System.Collections.ICollection" /> that contains the keys in the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" />.</summary><value>An <see cref="T:System.Collections.ICollection" /> that contains the keys in the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" />.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Values" /><altmember cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Item(System.String)" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.LoadBalanceTimeout">
- <summary>Gets or sets the minimum time, in seconds, for the connection to live in the connection pool before being destroyed.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.LoadBalanceTimeout" /> property, or 0 if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Load Balance Timeout" and "connection lifetime" keys within the connection string.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.MaxPoolSize">
- <summary>Gets or sets the maximum number of connections allowed in the connection pool for this specific connection string.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.MaxPoolSize" /> property, or 100 if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Max Pool Size" key within the connection string.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.MinPoolSize">
- <summary>Gets or sets the minimum number of connections allowed in the connection pool for this specific connection string.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.MinPoolSize" /> property, or 0 if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Min Pool Size" key within the connection string.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.MultipleActiveResultSets">
- <summary>When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection. For more information, see [Multiple Active Result Sets (MARS)](https://msdn.microsoft.com//library/cfa084cz.aspx).</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.MultipleActiveResultSets" /> property, or <see langword="false" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.MultiSubnetFailover">
- <summary>If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true provides faster detection of and connection to the (currently) active server. For more information about SqlClient support for Always On Availability Groups, see [SqlClient Support for High Availability, Disaster Recovery](~/docs/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery.md).</summary><value>Returns <see cref="T:System.Boolean" /> indicating the current value of the property.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.PacketSize">
- <summary>Gets or sets the size in bytes of the network packets used to communicate with an instance of SQL Server.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.PacketSize" /> property, or 8000 if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Packet Size" key within the connection string.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Password">
- <summary>Gets or sets the password for the SQL Server account.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Password" /> property, or <see langword="String.Empty" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The password was incorrectly set to null. See code sample below.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.PersistSecurityInfo">
- <summary>Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.PersistSecurityInfo" /> property, or <see langword="false" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Persist Security Info" and "persistsecurityinfo" keys within the connection string.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Pooling">
- <summary>Gets or sets a Boolean value that indicates whether the connection will be pooled or explicitly opened every time that the connection is requested.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Pooling" /> property, or <see langword="true" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Pooling" key within the connection string.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Replication">
- <summary>Gets or sets a Boolean value that indicates whether replication is supported using the connection.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Replication" /> property, or false if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Replication" key within the connection string.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.TransactionBinding">
- <summary>Gets or sets a string value that indicates how the connection maintains its association with an enlisted <see langword="System.Transactions" /> transaction.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.TransactionBinding" /> property, or <see langword="String.Empty" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The Transaction Binding keywords in a <xref:Microsoft.Data.SqlClient.SqlConnection.ConnectionString%2A> control how a <xref:Microsoft.Data.SqlClient.SqlConnection> binds to an enlisted <xref:System.Transactions.Transaction>.
-
- The following table shows the possible values for the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.TransactionBinding%2A> property:
-
- |Value|Description|
- |-----------|-----------------|
- |Implicit Unbind|The default. Causes the connection to detach from the transaction when it ends. After detaching, additional requests on the connection are performed in autocommit mode. The <xref:System.Transactions.Transaction.Current%2A> property is not checked when executing requests while the transaction is active. After the transaction has ended, additional requests are performed in autocommit mode.|
- |Explicit Unbind|Causes the connection to remain attached to the transaction until the connection is closed or until <xref:Microsoft.Data.SqlClient.SqlConnection.EnlistTransaction%2A> is called with a `null` (`Nothing` in Visual Basic) value. An <xref:System.InvalidOperationException> is thrown if <xref:System.Transactions.Transaction.Current%2A> is not the enlisted transaction or if the enlisted transaction is not active. This behavior enforces the strict scoping rules required for <xref:System.Transactions.TransactionScope> support.|
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.TrustServerCertificate">
- <summary>Gets or sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.</summary><value>A <see langword="Boolean" />. Recognized values are <see langword="true" />, <see langword="false" />, <see langword="yes" />, and <see langword="no" />.</value><remarks>
- <format type="text/markdown">< and [Using Encryption Without Validation](/sql/relational-databases/native-client/features/using-encryption-without-validation).
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.TypeSystemVersion">
- <summary>Gets or sets a string value that indicates the type system the application expects.</summary><value>The following table shows the possible values for the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.TypeSystemVersion" /> property:
-
- <list type="table"><listheader><term> Value
-
- </term><description> Description
-
- </description></listheader><item><term> SQL Server 2005
-
- </term><description> Uses the SQL Server 2005 type system. No conversions are made for the current version of ADO.NET.
-
- </description></item><item><term> SQL Server 2008
-
- </term><description> Uses the SQL Server 2008 type system.
-
- </description></item><item><term> Latest
-
- </term><description> Use the latest version than this client-server pair can handle. This will automatically move forward as the client and server components are upgraded.
-
- </description></item></list></value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The `TypeSystemVersion` property can be used to specify a down-level version of SQL Server for applications written against that version. This avoids possible problems with incompatible types in a newer version of SQL Server that may cause the application to break.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.UserID">
- <summary>Gets or sets the user ID to be used when connecting to SQL Server.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.UserID" /> property, or <see langword="String.Empty" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "User ID", "user", and "uid" keys within the connection string.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.UserInstance">
- <summary>Gets or sets a value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.UserInstance" /> property, or <see langword="False" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "User Instance" key within the connection string.
-
- > [!NOTE]
- > This feature is available only with the SQL Server Express Edition. For more information on user instances, see [SQL Server Express User Instances](~/docs/framework/data/adonet/sql/sql-server-express-user-instances.md).
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Values">
- <summary>Gets an <see cref="T:System.Collections.ICollection" /> that contains the values in the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" />.</summary><value>An <see cref="T:System.Collections.ICollection" /> that contains the values in the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" />.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Keys" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.WorkstationID">
- <summary>Gets or sets the name of the workstation connecting to SQL Server.</summary><value>The value of the <see cref="P:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.WorkstationID" /> property, or <see langword="String.Empty" /> if none has been supplied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property corresponds to the "Workstation ID" and "wsid" keys within the connection string.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">To set the value to null, use <see cref="F:System.DBNull.Value" />.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Clear">
- <summary>Clears the contents of the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> instance.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ContainsKey(System.String)">
- <param name="keyword">The key to locate in the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" />.</param><summary>Determines whether the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> contains a specific key.</summary><returns>true if the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> contains an element that has the specified key; otherwise, false.</returns><remarks>
- <format type="text/markdown"><]
-
- The example displays the following output in the console window:
-
- ```
- Connection string = Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True
- True
- True
- True
- False
- ```
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="keyword" /> is null (<see langword="Nothing" /> in Visual Basic)</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Remove(System.String)">
- <param name="keyword">The key of the key/value pair to be removed from the connection string in this <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" />.</param><summary>Removes the entry with the specified key from the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> instance.</summary><returns>
- <see langword="true" /> if the key existed within the connection string and was removed; <see langword="false" /> if the key did not exist.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Because the **Remove** method returns a value that indicates its success, it is not required to look for a key before trying to remove the key/value pair from the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> instance. Because the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> maintains a fixed-size collection of key/value pairs, calling the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Remove%2A> method simply resets the value of the key/value pair back to its default value.
-
- Because the collection of keys supported by the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> is fixed, every item within the collection has a known default value. The following table lists the keys, and the value for each when the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> is first initialized, or after the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.Remove%2A> method has been called.
-
- |Key|Default value|
- |---------|-------------------|
- |Application Name|".Net SqlClient Data Provider"|
- |Asynchronous Processing|False|
- |AttachDBFilename|Empty string|
- |Connection Timeout|15|
- |Context Connection|False|
- |Current Language|Empty string|
- |Data Source|Empty string|
- |Encrypt|False|
- |Enlist|True|
- |Failover Partner|Empty string|
- |Initial Catalog|Empty string|
- |Integrated Security|False|
- |Load Balance Timeout|0|
- |Max Pool Size|100|
- |Min Pool Size|0|
- |MultipleActiveResultSets|False|
- |Network Library|Empty string|
- |Packet Size|8000|
- |Password|Empty string|
- |Persist Security Info|False|
- |Pooling|True|
- |Replication|False|
- |Transaction Binding|Implicit Unbind|
- |User ID|Empty string|
- |User Instance|False|
- |Workstation ID|Empty string|
-
-
-
- ## Examples
- The following example converts an existing connection string from using Windows Authentication to using integrated security. The example works by removing the user name and password from the connection string, and then setting the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.IntegratedSecurity%2A> property of the <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> object.
-
- > [!NOTE]
- > This example includes a password to demonstrate how <xref:Microsoft.Data.SqlClient.SqlConnectionStringBuilder> works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application.
-
- [!code-csharp[SqlConnectionStringBuilder_Remove#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_Remove.cs#1)]
-
- The example displays the following text in the console window:
-
- ```
- Original: Data Source=(local);Initial Catalog=AdventureWorks;User ID=ab;Password= a1Pass@@11
- Modified: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True
- Database = AdventureWorks
- ```
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="keyword" /> is null (<see langword="Nothing" /> in Visual Basic)</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.ShouldSerialize(System.String)">
- <param name="keyword">The key to locate in the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" />.</param><summary>Indicates whether the specified key exists in this <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> instance.</summary><returns>
- <see langword="true" /> if the <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" /> contains an entry with the specified key; otherwise, <see langword="false" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This method behaves identically to the <xref:System.Data.Common.DbConnectionStringBuilder.ContainsKey%2A> method.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlConnectionStringBuilder.TryGetValue(System.String,System.Object@)">
- <param name="keyword">The key of the item to retrieve.</param><param name="value">The value corresponding to <paramref name="keyword" />.</param><summary>Retrieves a value corresponding to the supplied key from this <see cref="T:Microsoft.Data.SqlClient.SqlConnectionStringBuilder" />.</summary><returns>
- <see langword="true" /> if <paramref name="keyword" /> was found within the connection string; otherwise, <see langword="false" />.</returns><remarks>
- <format type="text/markdown"><]
-
- The sample displays the following results:
-
- ```
- Data Source=(local)
- Trusted_Connection=True
- Unable to retrieve value for 'InvalidKey'
- Unable to retrieve value for null key.
- ```
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="keyword" /> contains a null value (<see langword="Nothing" /> in Visual Basic).</exception>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlCredential">
- <summary>
- <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> provides a more secure way to specify the password for a login attempt using SQL Server Authentication.
-
- <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> is comprised of a user id and a password that will be used for SQL Server Authentication. The password in a <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object is of type <see cref="T:System.Security.SecureString" />.
-
- <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> cannot be inherited.
-
- Windows Authentication (<see langword="Integrated Security = true" />) remains the most secure way to log in to a SQL Server database.</summary><remarks>
- <format type="text/markdown"><.
-
- An <xref:System.InvalidOperationException> exception will be raised if a non-null <xref:Microsoft.Data.SqlClient.SqlCredential> object is used in a connection with any of the following connection string keywords:
-
- - `Integrated Security = true`
-
- - `Password`
-
- - `User ID`
-
- - `Context Connection = true`
-
- The following sample connects to a SQL Server database using <xref:Microsoft.Data.SqlClient.SqlConnection.Credential%2A>:
-
- ```
- // change connection string in the APP.CONFIG file
- <connectionStrings>
- <add name="MyConnString"
- connectionString="Initial Catalog=myDB;Server=myServer"
- providerName="Microsoft.Data.SqlClient" />
- </connectionStrings>
-
- // then use the following snippet:
- using System.Configuration;
-
- System.Windows.Controls.TextBox txtUserId = new System.Windows.Controls.TextBox();
- System.Windows.Controls.PasswordBox txtPwd = new System.Windows.Controls.PasswordBox();
-
- Configuration config = Configuration.WebConfigurationManager.OpenWebConfiguration(Null);
- ConnectionStringSettings connString = config.ConnectionStrings.ConnectionString["MyConnString"];
-
- using (SqlConnection conn = new SqlConnection(connString.ConnectionString))
- {
- SecureString pwd = txtPwd.SecurePassword;
- pwd.MakeReadOnly();
- SqlCredential cred = new SqlCredential(txtUserId.Text, pwd);
- conn.Credential = cred;
- conn.Open();
- }
- ```
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlCredential.#ctor(System.String,System.Security.SecureString)">
- <param name="userId">The user id.</param><param name="password">The password; a <see cref="T:System.Security.SecureString" /> value marked as read-only. Passing a read/write <see cref="T:System.Security.SecureString" /> parameter will raise an <see cref="T:System.ArgumentException" />.</param><summary>Creates an object of type <see cref="T:Microsoft.Data.SqlClient.SqlCredential" />.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The constructor does not accept null parameters. A <xref:System.String.Empty> value is allowed. An attempt to pass a null parameter in the constructor will raise an <xref:System.ArgumentNullException> exception.
-
- ]]></format>
- </remarks><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">ADO.NET Overview</related>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCredential.Password">
- <summary>Gets the password component of the <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object.</summary><value>The password component of the <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object.</value><remarks>To be added.</remarks><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">ADO.NET Overview</related>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlCredential.UserId">
- <summary>Gets the user ID component of the <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object.</summary><value>The user ID component of the <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object.</value><remarks>To be added.</remarks><related type="Article" href="~/docs/framework/data/adonet/ado-net-overview.md">ADO.NET Overview</related>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlDataAdapter">
- <summary>Represents a set of data commands and a database connection that are used to fill the <see cref="T:System.Data.DataSet" /> and update a SQL Server database. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><.
-
- <xref:Microsoft.Data.SqlClient.SqlDataAdapter> is used in conjunction with <xref:Microsoft.Data.SqlClient.SqlConnection> and <xref:Microsoft.Data.SqlClient.SqlCommand> to increase performance when connecting to a SQL Server database.
-
- > [!NOTE]
- > If you are using SQL Server stored procedures to edit or delete data using a `DataAdapter`, make sure that you do not use SET NOCOUNT ON in the stored procedure definition. This causes the rows affected count returned to be zero, which the `DataAdapter` interprets as a concurrency conflict. In this event, a <xref:System.Data.DBConcurrencyException> will be thrown.
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter> also includes the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.InsertCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.DeleteCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateCommand%2A>, and <xref:System.Data.Common.DataAdapter.TableMappings%2A> properties to facilitate the loading and updating of data.
-
- When an instance of <xref:Microsoft.Data.SqlClient.SqlDataAdapter> is created, the read/write properties are set to initial values. For a list of these values, see the <xref:Microsoft.Data.SqlClient.SqlDataAdapter> constructor.
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.InsertCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.DeleteCommand%2A>, and <xref:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateCommand%2A> are generic templates that are automatically filled with individual values from every modified row through the parameters mechanism.
-
- For every column that you propagate to the data source on <xref:System.Data.Common.DbDataAdapter.Update%2A>, a parameter should be added to the `InsertCommand`, `UpdateCommand`, or `DeleteCommand`. The <xref:System.Data.Common.DbParameter.SourceColumn%2A> property of the <xref:System.Data.Common.DbParameter> object should be set to the name of the column. This setting indicates that the value of the parameter is not set manually, but is taken from the particular column in the currently processed row.
-
- > [!NOTE]
- > An <xref:System.InvalidOperationException> will occur if the <xref:System.Data.Common.DbDataAdapter.Fill%2A> method is called and the table contains a user-defined type that is not available on the client computer. For more information, see [CLR User-Defined Types](/sql/relational-databases/clr-integration-database-objects-user-defined-types/clr-user-defined-types).
-
-
-
- ## Examples
- The following example uses the <xref:Microsoft.Data.SqlClient.SqlCommand>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter>, and <xref:Microsoft.Data.SqlClient.SqlConnection> to select records from a database and populate a <xref:System.Data.DataSet> with the selected rows. The filled <xref:System.Data.DataSet> is then returned. To accomplish this, the method is passed an initialized <xref:System.Data.DataSet>, a connection string, and a query string that is a Transact-SQL SELECT statement.
-
- [!code-csharp[SqlDataAdapter_SelectCommand Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_SelectCommand.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataAdapter.#ctor">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" /> class.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataAdapter.#ctor(Microsoft.Data.SqlClient.SqlCommand)">
- <param name="selectCommand">A <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> that is a Transact-SQL SELECT statement or stored procedure and is set as the <see cref="P:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand" /> property of the <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" /> class with the specified <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> as the <see cref="P:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand" /> property.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataAdapter.#ctor(System.String,Microsoft.Data.SqlClient.SqlConnection)">
- <param name="selectCommandText">A <see cref="T:System.String" /> that is a Transact-SQL SELECT statement or stored procedure to be used by the <see cref="P:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand" /> property of the <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" />.</param><param name="selectConnection">A <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> that represents the connection. If your connection string does not use <see langword="Integrated Security = true" />, you can use <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" /> class with a <see cref="P:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand" /> and a <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> object.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataAdapter.#ctor(System.String,System.String)">
- <param name="selectCommandText">A <see cref="T:System.String" /> that is a Transact-SQL SELECT statement or stored procedure to be used by the <see cref="P:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand" /> property of the <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" />.</param><param name="selectConnectionString">The connection string. If your connection string does not use <see langword="Integrated Security = true" />, you can use <see cref="M:Microsoft.Data.SqlClient.SqlDataAdapter.#ctor(System.String,Microsoft.Data.SqlClient.SqlConnection)" /> and <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" /> class with a <see cref="P:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand" /> and a connection string.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataAdapter.DeleteCommand">
- <summary>Gets or sets a Transact-SQL statement or stored procedure to delete records from the data set.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> used during <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> to delete records in the database that correspond to deleted rows in the <see cref="T:System.Data.DataSet" />.</value><remarks>
- <format type="text/markdown"><.
-
- When <xref:Microsoft.Data.SqlClient.SqlDataAdapter.DeleteCommand%2A> is assigned to a previously created <xref:Microsoft.Data.SqlClient.SqlCommand>, the <xref:Microsoft.Data.SqlClient.SqlCommand> is not cloned. The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.DeleteCommand%2A> maintains a reference to the previously created <xref:Microsoft.Data.SqlClient.SqlCommand> object.
-
- For every column that you propagate to the data source on <xref:System.Data.Common.DbDataAdapter.Update%2A>, a parameter should be added to the `InsertCommand`, `UpdateCommand`, or `DeleteCommand`. The `SourceColumn` property of the parameter should be set to the name of the column. This indicates that the value of the parameter is not set manually, but is taken from the particular column in the currently processed row.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlDataAdapter> and sets the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.InsertCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateCommand%2A>, and <xref:Microsoft.Data.SqlClient.SqlDataAdapter.DeleteCommand%2A> properties. It assumes you have already created a <xref:Microsoft.Data.SqlClient.SqlConnection> object.
-
- [!code-csharp[SqlDataAdapter#1](~/../sqlclient/doc/samples/SqlDataAdapter.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataAdapter.InsertCommand">
- <summary>Gets or sets a Transact-SQL statement or stored procedure to insert new records into the data source.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> used during <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> to insert records into the database that correspond to new rows in the <see cref="T:System.Data.DataSet" />.</value><remarks>
- <format type="text/markdown"><.
-
- When <xref:Microsoft.Data.SqlClient.SqlDataAdapter.InsertCommand%2A> is assigned to a previously created <xref:Microsoft.Data.SqlClient.SqlCommand>, the <xref:Microsoft.Data.SqlClient.SqlCommand> is not cloned. The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.InsertCommand%2A> maintains a reference to the previously created <xref:Microsoft.Data.SqlClient.SqlCommand> object.
-
- If execution of this command returns rows, these rows can be added to the <xref:System.Data.DataSet> depending on how you set the **UpdatedRowSource** property of the <xref:Microsoft.Data.SqlClient.SqlCommand> object.
-
- For every column that you propagate to the data source on <xref:System.Data.Common.DbDataAdapter.Update%2A>, a parameter should be added to `InsertCommand`, `UpdateCommand`, or `DeleteCommand`. The `SourceColumn` property of the parameter should be set to the name of the column. This indicates that the value of the parameter is not set manually, but is taken from the particular column in the currently processed row.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlDataAdapter> and sets the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.InsertCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateCommand%2A>, and <xref:Microsoft.Data.SqlClient.SqlDataAdapter.DeleteCommand%2A> properties. It assumes you have already created a <xref:Microsoft.Data.SqlClient.SqlConnection> object.
-
- [!code-csharp[SqlDataAdapter#1](~/../sqlclient/doc/samples/SqlDataAdapter.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand">
- <summary>Gets or sets a Transact-SQL statement or stored procedure used to select records in the data source.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> used during <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> to select records from the database for placement in the <see cref="T:System.Data.DataSet" />.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateBatchSize">
- <summary>Gets or sets the number of rows that are processed in each round-trip to the server.</summary><value>The number of rows to process per-batch.
-
- <list type="table"><listheader><term> Value is
-
- </term><description> Effect
-
- </description></listheader><item><term> 0
-
- </term><description> There is no limit on the batch size.
-
- </description></item><item><term> 1
-
- </term><description> Disables batch updating.
-
- </description></item><item><term> >1
-
- </term><description> Changes are sent using batches of <see cref="P:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateBatchSize" /> operations at a time.
-
- </description></item></list>
- When setting this to a value other than 1, all the commands associated with the <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" /> have to have their **UpdatedRowSource** property set to <see langword="None" /> or <see langword="OutputParameters" />. An exception is thrown otherwise.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
-
- Use the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateBatchSize%2A> property to update a data source with changes from a <xref:System.Data.DataSet>. This can increase application performance by reducing the number of round-trips to the server.
-
- Executing an extremely large batch could decrease performance. Therefore, you should test for the optimum batch size setting before implementing your application.
-
- An <xref:System.ArgumentOutOfRangeException> is thrown if the value is set to a number less than zero.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateCommand">
- <summary>Gets or sets a Transact-SQL statement or stored procedure used to update records in the data source.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> used during <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> to update records in the database that correspond to modified rows in the <see cref="T:System.Data.DataSet" />.</value><remarks>
- <format type="text/markdown"><.
-
- When <xref:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateCommand%2A> is assigned to a previously created <xref:Microsoft.Data.SqlClient.SqlCommand>, the <xref:Microsoft.Data.SqlClient.SqlCommand> is not cloned. The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateCommand%2A> maintains a reference to the previously created <xref:Microsoft.Data.SqlClient.SqlCommand> object.
-
- > [!NOTE]
- > If execution of this command returns rows, the updated rows may be merged with the <xref:System.Data.DataSet> depending on how you set the **UpdatedRowSource** property of the <xref:Microsoft.Data.SqlClient.SqlCommand> object.
-
- For every column that you propagate to the data source on <xref:System.Data.Common.DbDataAdapter.Update%2A>, a parameter should be added to `InsertCommand`, `UpdateCommand`, or `DeleteCommand`.
-
- The `SourceColumn` property of the parameter should be set to the name of the column. This indicates that the value of the parameter is not set manually, but taken from the particular column in the currently processed row.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlDataAdapter> and sets the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.SelectCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.InsertCommand%2A>, <xref:Microsoft.Data.SqlClient.SqlDataAdapter.UpdateCommand%2A> and <xref:Microsoft.Data.SqlClient.SqlDataAdapter.DeleteCommand%2A> properties. It assumes you have already created a <xref:Microsoft.Data.SqlClient.SqlConnection> object.
-
- [!code-csharp[SqlDataAdapter#1](~/../sqlclient/doc/samples/SqlDataAdapter.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="E:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated">
- <summary>Occurs during <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> after a command is executed against the data source. The attempt to update is made, so the event fires.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- When using <xref:System.Data.Common.DbDataAdapter.Update%2A>, there are two events that occur per data row updated. The order of execution is as follows:
-
- 1. The values in the <xref:System.Data.DataRow> are moved to the parameter values.
-
- 2. The <xref:System.Data.Common.DbDataAdapter.OnRowUpdating%2A> event is raised.
-
- 3. The command executes.
-
- 4. If the command is set to `FirstReturnedRecord`, the first returned result is placed in the <xref:System.Data.DataRow>.
-
- 5. If there are output parameters, they are placed in the <xref:System.Data.DataRow>.
-
- 6. The <xref:System.Data.Common.DbDataAdapter.OnRowUpdated%2A> event is raised.
-
- 7. <xref:System.Data.DataRow.AcceptChanges%2A> is called.
-
-
-
- ## Examples
- The following example shows how to use both the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> and <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> events.
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> event returns this output:
-
- event args: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 status=0)
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> event returns this output:
-
- event args: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 recordsAffected=1 row=System.Data.DataRow[37] status=0)
-
- [!code-csharp[SqlDataAdapter_RowUpdated Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_RowUpdated.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="E:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating">
- <summary>Occurs during <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> before a command is executed against the data source. The attempt to update is made, so the event fires.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- When using <xref:System.Data.Common.DbDataAdapter.Update%2A>, there are two events that occur per data row updated. The order of execution is as follows:
-
- 1. The values in the <xref:System.Data.DataRow> are moved to the parameter values.
-
- 2. The <xref:System.Data.Common.DbDataAdapter.OnRowUpdating%2A> event is raised.
-
- 3. The command executes.
-
- 4. If the command is set to `FirstReturnedRecord`, the first returned result is placed in the <xref:System.Data.DataRow>.
-
- 5. If there are output parameters, they are placed in the <xref:System.Data.DataRow>.
-
- 6. The <xref:System.Data.Common.DbDataAdapter.OnRowUpdated%2A> event is raised.
-
- 7. <xref:System.Data.DataRow.AcceptChanges%2A> is called.
-
-
-
- ## Examples
- The following example shows how to use both the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> and <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> events.
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> event returns this output:
-
- event args: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 status=0)
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> event returns this output:
-
- event args: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 recordsAffected=1 row=System.Data.DataRow[37] status=0)
-
- [!code-csharp[SqlDataAdapter_RowUpdated Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_RowUpdated.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)">
- <param name="value">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataAdapter.OnRowUpdating(System.Data.Common.RowUpdatingEventArgs)">
- <param name="value">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlDataReader">
- <summary>Provides a way of reading a forward-only stream of rows from a SQL Server database. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- To create a <xref:Microsoft.Data.SqlClient.SqlDataReader>, you must call the <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A> method of the <xref:Microsoft.Data.SqlClient.SqlCommand> object, instead of directly using a constructor.
-
- While the <xref:Microsoft.Data.SqlClient.SqlDataReader> is being used, the associated <xref:Microsoft.Data.SqlClient.SqlConnection> is busy serving the <xref:Microsoft.Data.SqlClient.SqlDataReader>, and no other operations can be performed on the <xref:Microsoft.Data.SqlClient.SqlConnection> other than closing it. This is the case until the <xref:Microsoft.Data.SqlClient.SqlDataReader.Close%2A> method of the <xref:Microsoft.Data.SqlClient.SqlDataReader> is called. For example, you cannot retrieve output parameters until after you call <xref:Microsoft.Data.SqlClient.SqlDataReader.Close%2A>.
-
- Changes made to a result set by another process or thread while data is being read may be visible to the user of the `SqlDataReader`. However, the precise behavior is timing dependent.
-
- <xref:Microsoft.Data.SqlClient.SqlDataReader.IsClosed%2A> and <xref:Microsoft.Data.SqlClient.SqlDataReader.RecordsAffected%2A> are the only properties that you can call after the <xref:Microsoft.Data.SqlClient.SqlDataReader> is closed. Although the <xref:Microsoft.Data.SqlClient.SqlDataReader.RecordsAffected%2A> property may be accessed while the <xref:Microsoft.Data.SqlClient.SqlDataReader> exists, always call <xref:Microsoft.Data.SqlClient.SqlDataReader.Close%2A> before returning the value of <xref:Microsoft.Data.SqlClient.SqlDataReader.RecordsAffected%2A> to guarantee an accurate return value.
-
- When using sequential access (<xref:System.Data.CommandBehavior.SequentialAccess?displayProperty=nameWithType>), an <xref:System.InvalidOperationException> will be raised if the <xref:Microsoft.Data.SqlClient.SqlDataReader> position is advanced and another read operation is attempted on the previous column.
-
- > [!NOTE]
- > For optimal performance, <xref:Microsoft.Data.SqlClient.SqlDataReader> avoids creating unnecessary objects or making unnecessary copies of data. Therefore, multiple calls to methods such as <xref:Microsoft.Data.SqlClient.SqlDataReader.GetValue%2A> return a reference to the same object. Use caution if you are modifying the underlying value of the objects returned by methods such as <xref:Microsoft.Data.SqlClient.SqlDataReader.GetValue%2A>.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection>, a <xref:Microsoft.Data.SqlClient.SqlCommand>, and a <xref:Microsoft.Data.SqlClient.SqlDataReader>. The example reads through the data, writing it out to the console window. The code then closes the <xref:Microsoft.Data.SqlClient.SqlDataReader>. The <xref:Microsoft.Data.SqlClient.SqlConnection> is closed automatically at the end of the `using` code block.
-
- [!code-csharp[SqlDataReader_Read Example#1](~/../sqlclient/doc/samples/SqlDataReader_Read.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.Connection">
- <summary>Gets the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> associated with the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />.</summary><value>The <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> associated with the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.Depth">
- <summary>Gets a value that indicates the depth of nesting for the current row.</summary><value>The depth of nesting for the current row.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The outermost table has a depth of zero. The .NET Framework Data Provider for SQL Server does not support nesting and always returns zero.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.FieldCount">
- <summary>Gets the number of columns in the current row.</summary><value>When not positioned in a valid recordset, 0; otherwise the number of columns in the current row. The default is -1.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Executing a query that, by its nature, does not return rows (such as a DELETE query), sets <xref:Microsoft.Data.SqlClient.SqlDataReader.FieldCount%2A> to 0. However. this should not be confused with a query that returns 0 rows (such as SELECT * FROM *table* WHERE 1 = 2) in which case <xref:Microsoft.Data.SqlClient.SqlDataReader.FieldCount%2A> returns the number of columns in the table, including hidden fields. Use <xref:Microsoft.Data.SqlClient.SqlDataReader.VisibleFieldCount%2A> to exclude hidden fields.
-
- ]]></format>
- </remarks><exception cref="T:System.NotSupportedException">There is no current connection to an instance of SQL Server.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.HasRows">
- <summary>Gets a value that indicates whether the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> contains one or more rows.</summary><value>
- <see langword="true" /> if the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> contains one or more rows; otherwise <see langword="false" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.IsClosed">
- <summary>Retrieves a Boolean value that indicates whether the specified <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> instance has been closed.</summary><value>
- <see langword="true" /> if the specified <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> instance is closed; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- It is not possible to read from a <xref:Microsoft.Data.SqlClient.SqlDataReader> instance that is closed.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.Item(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column in its native format given the column ordinal.</summary><value>The value of the specified column in its native format.</value><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.Item(System.String)">
- <param name="name">The column name.</param><summary>Gets the value of the specified column in its native format given the column name.</summary><value>The value of the specified column in its native format.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- A case-sensitive lookup is performed first. If it fails, a second case-insensitive search is made (a case-insensitive comparison is done using the database collation). Unexpected results can occur when comparisons are affected by culture-specific casing rules. For example, in Turkish, the following example yields the wrong results because the file system in Turkish does not use linguistic casing rules for the letter 'i' in "file".
-
- This method is kana-width insensitive.
-
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">No column with the specified name was found.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.RecordsAffected">
- <summary>Gets the number of rows changed, inserted, or deleted by execution of the Transact-SQL statement.</summary><value>The number of rows changed, inserted, or deleted; 0 if no rows were affected or the statement failed; and -1 for SELECT statements.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The value of this property is cumulative. For example, if two records are inserted in batch mode, the value of `RecordsAffected` will be two.
-
- <xref:Microsoft.Data.SqlClient.SqlDataReader.IsClosed%2A> and <xref:Microsoft.Data.SqlClient.SqlDataReader.RecordsAffected%2A> are the only properties that you can call after the <xref:Microsoft.Data.SqlClient.SqlDataReader> is closed.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.SensitivityClassification">
- <summary>Gets the <see cref="T:Microsoft.Data.SqlClient.DataClassification.SensitivityClassification" /> information with the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />.</summary><value>The <see cref="T:Microsoft.Data.SqlClient.DataClassification.SensitivityClassification" /> associated with the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDataReader.VisibleFieldCount">
- <summary>Gets the number of fields in the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> that are not hidden.</summary><value>The number of fields that are not hidden.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This value is used to determine how many fields in the <xref:Microsoft.Data.SqlClient.SqlDataReader> are visible. For example, a SELECT on a partial primary key returns the remaining parts of the key as hidden fields. The hidden fields are always appended behind the visible fields.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.Close">
- <summary>Closes the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> object.</summary><remarks>
- <format type="text/markdown">< block.
-
- The `Close` method populates the values for output parameters, return values and `RecordsAffected` on the <xref:Microsoft.Data.SqlClient.SqlDataReader> by consuming any pending results. This may be a long operation depending on the amount of data to be consumed. If output values, return values, and `RecordsAffected` are not important to your application, the time to close may be shortened by calling the <xref:Microsoft.Data.SqlClient.SqlCommand.Cancel%2A> method of the associated <xref:Microsoft.Data.SqlClient.SqlCommand> object before the `Close` method is called.
-
- > [!CAUTION]
- > Do not call `Close` or `Dispose` on a Connection, a DataReader, or any other managed object in the `Finalize` method of your class. In a finalizer, you should only release unmanaged resources that your class owns directly. If your class does not own any unmanaged resources, do not include a `Finalize` method in your class definition. For more information, see [Garbage Collection](~/docs/standard/garbage-collection/index.md).
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection>, a <xref:Microsoft.Data.SqlClient.SqlCommand>, and a <xref:Microsoft.Data.SqlClient.SqlDataReader>. The example reads through the data, writing it out to the console window. The code then closes the <xref:Microsoft.Data.SqlClient.SqlDataReader>. The <xref:Microsoft.Data.SqlClient.SqlConnection> is closed automatically at the end of the `using` code block.
-
- [!code-csharp[SqlDataReader_Close Example#1](~/../sqlclient/doc/samples/SqlDataReader_Close.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetBoolean(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a Boolean.</summary><returns>The value of the column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a Boolean, or an exception is generated.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetByte(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a byte.</summary><returns>The value of the specified column as a byte.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a byte.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetBytes(System.Int32,System.Int64,System.Byte[],System.Int32,System.Int32)">
- <param name="i">The zero-based column ordinal.</param><param name="dataIndex">The index within the field from which to begin the read operation.</param><param name="buffer">The buffer into which to read the stream of bytes.</param><param name="bufferIndex">The index within the <paramref name="buffer" /> where the write operation is to start.</param><param name="length">The maximum length to copy into the buffer.</param><summary>Reads a stream of bytes from the specified column offset into the buffer an array starting at the given buffer offset.</summary><returns>The actual number of bytes read.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlDataReader.GetBytes%2A> returns the number of available bytes in the field. Most of the time this is the exact length of the field. However, the number returned may be less than the true length of the field if `GetBytes` has already been used to obtain bytes from the field. This may be the case, for example, if the <xref:Microsoft.Data.SqlClient.SqlDataReader> is reading a large data structure into a buffer. For more information, see the `SequentialAccess` setting for <xref:System.Data.CommandBehavior>.
-
- If you pass a buffer that is `null`, <xref:Microsoft.Data.SqlClient.SqlDataReader.GetBytes%2A> returns the length of the entire field in bytes, not the remaining size based on the buffer offset parameter.
-
- No conversions are performed; therefore, the data retrieved must already be a byte array.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetChar(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a single character.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Not supported for <xref:Microsoft.Data.SqlClient>.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetChars(System.Int32,System.Int64,System.Char[],System.Int32,System.Int32)">
- <param name="i">The zero-based column ordinal.</param><param name="dataIndex">The index within the field from which to begin the read operation.</param><param name="buffer">The buffer into which to read the stream of bytes.</param><param name="bufferIndex">The index within the <paramref name="buffer" /> where the write operation is to start.</param><param name="length">The maximum length to copy into the buffer.</param><summary>Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.</summary><returns>The actual number of characters read.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlDataReader.GetChars%2A> returns the number of available characters in the field. Frequently this is the exact length of the field. However, the number returned may be less than the true length of the field if `GetChars` has already been used to obtain characters from the field. This may be the case, for example, if the <xref:Microsoft.Data.SqlClient.SqlDataReader> is reading a large data structure into a buffer. For more information, see the `SequentialAccess` setting for <xref:System.Data.CommandBehavior>.
-
- The actual number of characters read can be less than the requested length, if the end of the field is reached. If you pass a buffer that is `null`, <xref:Microsoft.Data.SqlClient.SqlDataReader.GetChars%2A> returns the length of the entire field in characters, not the remaining size based on the buffer offset parameter.
-
- No conversions are performed; therefore. the data retrieved must already be a character array.
-
- > [!NOTE]
- > The <xref:Microsoft.Data.SqlClient.SqlDataReader.GetChars%2A> method returns 0 when `dataIndex` is negative.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetDataTypeName(System.Int32)">
- <param name="i">The zero-based ordinal position of the column to find.</param><summary>Gets a string representing the data type of the specified column.</summary><returns>The string representing the data type of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Returns the name of the back-end data type.
-
- `numeric` is a synonym in SQL Server for the `decimal` data type. `GetDataTypeName` will return "decimal" for a column defined as either decimal or numeric.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetDateTime(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.DateTime" /> object.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a <xref:System.DateTime> object.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetDateTimeOffset(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Retrieves the value of the specified column as a <see cref="T:System.DateTimeOffset" /> object.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a <xref:System.DateTimeOffset> object.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetDecimal(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Decimal" /> object.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a <xref:System.Decimal> object.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetDouble(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a double-precision floating point number.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed. Therefore, the data retrieved must already be a double-precision floating point number.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetEnumerator">
- <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />.</summary><returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Although you can use this method to retrieve an explicit enumerator, in languages that support a `foreach` construct, it is simpler to use the looping construct directly in order to iterate through the rows in the data reader.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetFieldType(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the <see cref="T:System.Type" /> that is the data type of the object.</summary><returns>The <see cref="T:System.Type" /> that is the data type of the object. If the type does not exist on the client, in the case of a User-Defined Type (UDT) returned from the database, **GetFieldType** returns null.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetFieldValue``1(System.Int32)">
- <typeparam name="T">The type of the value to be returned.</typeparam><param name="i">The column to be retrieved.</param><summary>Synchronously gets the value of the specified column as a type. <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.GetFieldValueAsync``1(System.Int32,System.Threading.CancellationToken)" /> is the asynchronous version of this method.</summary><returns>The returned type object.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The connection drops or is closed during the data retrieval.
-
- The <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> is closed during the data retrieval.
-
- There is no data ready to be read (for example, the first <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.Read" /> hasn't been called, or returned false).
-
- Tried to read a previously-read column in sequential mode.
-
- There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.</exception><exception cref="T:System.IndexOutOfRangeException">Trying to read a column that does not exist.</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The value of the column was null (<see cref="M:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull(System.Int32)" /> == <see langword="true" />), retrieving a non-SQL type.</exception><exception cref="T:System.InvalidCastException">
- <typeparamref name="T" /> doesn't match the type returned by SQL Server or cannot be cast.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetFieldValueAsync``1(System.Int32,System.Threading.CancellationToken)">
- <typeparam name="T">The type of the value to be returned.</typeparam><param name="i">The column to be retrieved.</param><param name="cancellationToken">The cancellation instruction, which propagates a notification that operations should be canceled. This does not guarantee the cancellation. A setting of <see langword="CancellationToken.None" /> makes this method equivalent to <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull(System.Int32)" />. The returned task must be marked as cancelled.</param><summary>Asynchronously gets the value of the specified column as a type. <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.GetFieldValue``1(System.Int32)" /> is the synchronous version of this method.</summary><returns>The returned type object.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The connection drops or is closed during the data retrieval.
-
- The <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> is closed during the data retrieval.
-
- There is no data ready to be read (for example, the first <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.Read" /> hasn't been called, or returned false).
-
- Tried to read a previously-read column in sequential mode.
-
- There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.
-
- <see langword="Context Connection=true" /> is specified in the connection string.</exception><exception cref="T:System.IndexOutOfRangeException">Trying to read a column that does not exist.</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The value of the column was null (<see cref="M:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull(System.Int32)" /> == <see langword="true" />), retrieving a non-SQL type.</exception><exception cref="T:System.InvalidCastException">
- <typeparamref name="T" /> doesn't match the type returned by SQL Server or cannot be cast.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetFloat(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a single-precision floating point number.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed. Therefore, the data retrieved must already be a single-precision floating point number.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetGuid(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a globally unique identifier (GUID).</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a GUID.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetInt16(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a 16-bit signed integer.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a 16-bit signed integer.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetInt32(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a 32-bit signed integer.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a 32-bit signed integer.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetInt64(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a 64-bit signed integer.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a 64-bit signed integer.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetName(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the name of the specified column.</summary><returns>The name of the specified column.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetOrdinal(System.String)">
- <param name="name">The name of the column.</param><summary>Gets the column ordinal, given the name of the column.</summary><returns>The zero-based column ordinal.</returns><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">The name specified is not a valid column name.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetProviderSpecificFieldType(System.Int32)">
- <param name="i">An <see cref="T:System.Int32" /> representing the column ordinal.</param><summary>Gets an <see langword="Object" /> that is a representation of the underlying provider-specific field type.</summary><returns>Gets an <see cref="T:System.Object" /> that is a representation of the underlying provider-specific field type.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetProviderSpecificValue(System.Int32)">
- <param name="i">An <see cref="T:System.Int32" /> representing the column ordinal.</param><summary>Gets an <see langword="Object" /> that is a representation of the underlying provider specific value.</summary><returns>An <see cref="T:System.Object" /> that is a representation of the underlying provider specific value.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetProviderSpecificValues(System.Object[])">
- <param name="values">An array of <see cref="T:System.Object" /> into which to copy the column values.</param><summary>Gets an array of objects that are a representation of the underlying provider specific values.</summary><returns>The array of objects that are a representation of the underlying provider specific values.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlBinary(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlBinary" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlBinary" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore the data retrieved must already be a binary structure or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlBoolean(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlBoolean" />.</summary><returns>The value of the column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a Boolean or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlByte(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlByte" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlByte" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore the data retrieved must already be a byte, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlBytes(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as <see cref="T:System.Data.SqlTypes.SqlBytes" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlBytes" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlChars(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as <see cref="T:System.Data.SqlTypes.SqlChars" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlChars" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlDateTime(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlDateTime" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlDateTime" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a date/time value, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlDecimal(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlDecimal" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlDecimal" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a decimal value, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlDouble(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlDouble" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlDouble" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a double-precision floating-point number, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlGuid(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlGuid" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlGuid" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a GUID, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlInt16(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlInt16" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlInt16" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a 16-bit signed integer, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlInt32(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlInt32" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlInt32" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore the data retrieved must already be a 32-bit signed integer, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlInt64(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlInt64" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlInt64" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a 64-bit signed integer, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlMoney(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlMoney" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlMoney" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a decimal value, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlSingle(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlSingle" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlSingle" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a single precision floating point number, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlString(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a <see cref="T:System.Data.SqlTypes.SqlString" />.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlTypes.SqlString" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a string, or an exception is generated.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlValue(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Returns the data value in the specified column as a SQL Server type.</summary><returns>The value of the column expressed as a <see cref="T:System.Data.SqlDbType" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlDataReader.GetSqlValue%2A> returns data using the native SQL Server types. To retrieve data using the .NET Framework types, see <xref:Microsoft.Data.SqlClient.SqlDataReader.GetValue%2A>.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlValues(System.Object[])">
- <param name="values">An array of <see cref="T:System.Object" /> into which to copy the values. The column values are expressed as SQL Server types.</param><summary>Fills an array of <see cref="T:System.Object" /> that contains the values for all the columns in the record, expressed as SQL Server types.</summary><returns>An integer indicating the number of columns copied.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Returns the values for all the columns in the record in a single call, using the SQL type system instead of the CLR type system. The length of the <xref:System.Object> array does not need to match the number of columns in the record. You can pass an <xref:System.Object> array that contains fewer than the number of columns contained in the record. Only the amount of data the <xref:System.Object> array holds is copied to the array, starting at the column with ordinal 0. You can also pass an <xref:System.Object> array whose length is more than the number of columns contained in the resulting row. Any remaining columns are untouched.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="values" /> is null.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSqlXml(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as an XML value.</summary><returns>A <see cref="T:System.Data.SqlTypes.SqlXml" /> value that contains the XML stored within the corresponding field.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be an XML value.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentOutOfRangeException">The index passed was outside the range of 0 to <see cref="P:System.Data.DataTableReader.FieldCount" /> - 1</exception><exception cref="T:System.InvalidOperationException">An attempt was made to read or access columns in a closed <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />.</exception><exception cref="T:System.InvalidCastException">The retrieved data is not compatible with the <see cref="T:System.Data.SqlTypes.SqlXml" /> type.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetSchemaTable">
- <summary>Returns a <see cref="T:System.Data.DataTable" /> that describes the column metadata of the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />.</summary><returns>A <see cref="T:System.Data.DataTable" /> that describes the column metadata.</returns><remarks>
- <format type="text/markdown"><.|
- |DataTypeName|Returns a string representing the data type of the specified column.|
- |IsAliased|`true`: The column name is an alias.<br /><br /> `false`: The column name is not an alias.|
- |IsAutoIncrement|`true`: The column assigns values to new rows in fixed increments.<br /><br /> `false`: The column does not assign values to new rows in fixed increments. The default of this column is `false`.|
- |IsColumnSet|`true`: The column is a sparse column that is a member of a column set.|
- |IsExpression|`true`: The column is an expression.<br /><br /> `false`: The column is not an expression.|
- |IsHidden|`true`: The column is hidden.<br /><br /> `false`: The column is not hidden.|
- |IsIdentity|`true`: The column is an identity column.<br /><br /> `false`: The column is not an identity column.|
- |IsKey|`true`: The column is one of a set of columns in the rowset that, taken together, uniquely identify the row. The set of columns with `IsKey` set to `true` must uniquely identify a row in the rowset. There is no requirement that this set of columns is a minimal set of columns. This set of columns may be generated from a base table primary key, a unique constraint or a unique index.<br /><br /> `false`: The column is not required to uniquely identify the row.|
- |IsLong|`true`: The column contains a Binary Long Object (BLOB) that contains very long data. The definition of very long data is provider-specific.<br /><br /> `false`: The column does not contain a Binary Long Object (BLOB) that contains very long data.|
- |IsReadOnly|`true`: The column cannot be modified.<br /><br /> `false`: The column can be modified.|
- |IsRowVersion|`true`: The column contains a persistent row identifier that cannot be written to, and has no meaningful value except to identity the row.<br /><br /> `false`: The column does not contain a persistent row identifier that cannot be written to, and has no meaningful value except to identity the row.|
- |IsUnique|`true`: Column is of type `timestamp`.<br /><br /> `false`: Column is not of type `timestamp`.|
- |NonVersionedProviderType|The type of the column irrespective of the current `Type System Version` specified in the connection string. The returned value is from the <xref:System.Data.SqlDbType> enumeration.|
- |NumericPrecision|If `ProviderType` is a numeric data type, this is the maximum precision of the column. The precision depends on the definition of the column. If `ProviderType` is not a numeric data type, this is 255.|
- |NumericScale|If `ProviderType` is DBTYPE_DECIMAL or DBTYPE_NUMERIC, the number of digits to the right of the decimal point. Otherwise, this is 255.|
- |ProviderSpecificDataType|Returns the provider-specific data type of the column based on the `Type System Version` keyword in the connection string.|
- |ProviderType|The indicator of the column's data type. If the data type of the column varies from row to row, this must be Object. This column cannot contain a null value.|
- |UdtAssemblyQualifiedName|If the column is a user-defined type (UDT), this is the qualified name of the UDT's assembly as per <xref:System.Type.AssemblyQualifiedName%2A>. If the column is not a UDT, this is null.|
- |XmlSchemaCollectionDatabase|The name of the database where the schema collection for this XML instance is located, if the row contains information about an XML column. This value is `null` (`Nothing` in Visual Basic) if the collection is defined within the current database. It is also null if there is no schema collection, in which case the `XmlSchemaCollectionName` and `XmlSchemaCollectionOwningSchema` columns are also null.|
- |XmlSchemaCollectionName|The name of the schema collection for this XML instance, if the row contains information about an XML column. This value is `null` (`Nothing` in Visual Basic) if there is no associated schema collection. If the value is null, the `XmlSchemaCollectionDatabase` and `XmlSchemaCollectionOwningSchema` columns are also null.|
- |XmlSchemaCollectionOwningSchema|The owning relational schema where the schema collection for this XML instance is located, if the row contains information about an XML column. This value is `null` (`Nothing` in Visual Basic) if the collection is defined within the current database. It is also null if there is no schema collection, in which case the `XmlSchemaCollectionDatabase` and `XmlSchemaCollectionName` columns are also null.|
-
- > [!NOTE]
- > To make sure that metadata columns return the correct information, you must call <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader%2A> with the `behavior` parameter set to `KeyInfo`. Otherwise, some of the columns in the schema table may return default, null, or incorrect data.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> is closed.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetStream(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Retrieves binary, image, varbinary, UDT, and variant data types as a <see cref="T:System.IO.Stream" />.</summary><returns>A stream object.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The connection drops or is closed during the data retrieval.
-
- The <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> is closed during the data retrieval.
-
- There is no data ready to be read (for example, the first <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.Read" /> hasn't been called, or returned false).
-
- Tried to read a previously-read column in sequential mode.
-
- There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.</exception><exception cref="T:System.IndexOutOfRangeException">Trying to read a column that does not exist.</exception><exception cref="T:System.InvalidCastException">The returned type was not one of the types below:
-
- - binary
-
- - image
-
- - varbinary
-
- - udt</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetString(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column as a string.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a string.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetTextReader(System.Int32)">
- <param name="i">The column to be retrieved.</param><summary>Retrieves Char, NChar, NText, NVarChar, text, varChar, and Variant data types as a <see cref="T:System.IO.TextReader" />.</summary><returns>The returned object.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The connection drops or is closed during the data retrieval.
-
- The <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> is closed during the data retrieval.
-
- There is no data ready to be read (for example, the first <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.Read" /> hasn't been called, or returned false).
-
- Tried to read a previously-read column in sequential mode.
-
- There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.</exception><exception cref="T:System.IndexOutOfRangeException">Trying to read a column that does not exist.</exception><exception cref="T:System.InvalidCastException">The returned type was not one of the types below:
-
- - char
-
- - nchar
-
- - ntext
-
- - nvarchar
-
- - text
-
- - varchar</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetTimeSpan(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Retrieves the value of the specified column as a <see cref="T:System.TimeSpan" /> object.</summary><returns>The value of the specified column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- No conversions are performed; therefore, the data retrieved must already be a <xref:System.TimeSpan> object.
-
- Call <xref:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull%2A> to check for null values before calling this method.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The specified cast is not valid.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetValue(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets the value of the specified column in its native format.</summary><returns>This method returns <see cref="T:System.DBNull" /> for null database columns.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlDataReader.GetValue%2A> returns data using the .NET Framework types.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetValues(System.Object[])">
- <param name="values">An array of <see cref="T:System.Object" /> into which to copy the attribute columns.</param><summary>Populates an array of objects with the column values of the current row.</summary><returns>The number of instances of <see cref="T:System.Object" /> in the array.</returns><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.GetXmlReader(System.Int32)">
- <param name="i">The value of the specified column.</param><summary>Retrieves data of type XML as an <see cref="T:System.Xml.XmlReader" />.</summary><returns>The returned object.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The connection drops or is closed during the data retrieval.
-
- The <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> is closed during the data retrieval.
-
- There is no data ready to be read (for example, the first <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.Read" /> hasn't been called, or returned false).
-
- Trying to read a previously read column in sequential mode.
-
- There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.</exception><exception cref="T:System.IndexOutOfRangeException">Trying to read a column that does not exist.</exception><exception cref="T:System.InvalidCastException">The returned type was not xml.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.IsCommandBehavior(System.Data.CommandBehavior)">
- <param name="condition">A <see cref="T:System.Data.CommandBehavior" /> enumeration.</param><summary>Determines whether the specified <see cref="T:System.Data.CommandBehavior" /> matches that of the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> .</summary><returns>
- <see langword="true" /> if the specified <see cref="T:System.Data.CommandBehavior" /> is true, <see langword="false" /> otherwise.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull(System.Int32)">
- <param name="i">The zero-based column ordinal.</param><summary>Gets a value that indicates whether the column contains non-existent or missing values.</summary><returns>
- <see langword="true" /> if the specified column value is equivalent to <see cref="T:System.DBNull" />; otherwise <see langword="false" />.</returns><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.IsDBNullAsync(System.Int32,System.Threading.CancellationToken)">
- <param name="i">The zero-based column to be retrieved.</param><param name="cancellationToken">The cancellation instruction, which propagates a notification that operations should be canceled. This does not guarantee the cancellation. A setting of <see langword="CancellationToken.None" /> makes this method equivalent to <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull(System.Int32)" />. The returned task must be marked as cancelled.</param><summary>An asynchronous version of <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.IsDBNull(System.Int32)" />, which gets a value that indicates whether the column contains non-existent or missing values.
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.</summary><returns>
- <see langword="true" /> if the specified column value is equivalent to <see langword="DBNull" /> otherwise <see langword="false" />.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">The connection drops or is closed during the data retrieval.
-
- The <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> is closed during the data retrieval.
-
- There is no data ready to be read (for example, the first <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.Read" /> hasn't been called, or returned false).
-
- Trying to read a previously read column in sequential mode.
-
- There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.
-
- <see langword="Context Connection=true" /> is specified in the connection string.</exception><exception cref="T:System.IndexOutOfRangeException">Trying to read a column that does not exist.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.NextResult">
- <summary>Advances the data reader to the next result, when reading the results of batch Transact-SQL statements.</summary><returns>
- <see langword="true" /> if there are more result sets; otherwise <see langword="false" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Used to process multiple results, which can be generated by executing batch Transact-SQL statements.
-
- By default, the data reader is positioned on the first result.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.NextResultAsync(System.Threading.CancellationToken)">
- <param name="cancellationToken">The cancellation instruction.</param><summary>An asynchronous version of <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.NextResult" />, which advances the data reader to the next result, when reading the results of batch Transact-SQL statements.
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.</summary><returns>A task representing the asynchronous operation.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">Calling <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.NextResultAsync(System.Threading.CancellationToken)" /> more than once for the same instance before task completion.
-
- <see langword="Context Connection=true" /> is specified in the connection string.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">SQL Server returned an error while executing the command text.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.Read">
- <summary>Advances the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> to the next record.</summary><returns>
- <see langword="true" /> if there are more rows; otherwise <see langword="false" />.</returns><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:Microsoft.Data.SqlClient.SqlException">SQL Server returned an error while executing the command text.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDataReader.ReadAsync(System.Threading.CancellationToken)">
- <param name="cancellationToken">The cancellation instruction.</param><summary>An asynchronous version of <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.Read" />, which advances the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> to the next record.
-
- The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.</summary><returns>A task representing the asynchronous operation.</returns><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks><exception cref="T:System.InvalidOperationException">Calling <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.ReadAsync(System.Threading.CancellationToken)" /> more than once for the same instance before task completion.
-
- <see langword="Context Connection=true" /> is specified in the connection string.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">SQL Server returned an error while executing the command text.</exception>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlDependency">
- <summary>The <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> object represents a query notification dependency between an application and an instance of SQL Server. An application can create a <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> object and register to receive notifications via the <see cref="T:Microsoft.Data.SqlClient.OnChangeEventHandler" /> event handler.</summary><remarks>
- <format type="text/markdown"><.
-
- > [!NOTE]
- > <xref:Microsoft.Data.SqlClient.SqlDependency> was designed to be used in ASP.NET or middle-tier services where there is a relatively small number of servers having dependencies active against the database. It was not designed for use in client applications, where hundreds or thousands of client computers would have <xref:Microsoft.Data.SqlClient.SqlDependency> objects set up for a single database server. If you are developing an application where you need reliable sub-second notifications when data changes, review the sections [Planning an Efficient Query Notifications Strategy](https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms187528(v=sql.105)#planning-an-efficient-query-notifications-strategy) and [Alternatives to Query Notifications](https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms187528(v=sql.105)#alternatives-to-query-notifications) in the [Planning for Notifications](https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms187528(v%3dsql.105)) article.
-
- For more information, see [Query Notifications in SQL Server](~/docs/framework/data/adonet/sql/query-notifications-in-sql-server.md) and [Building Notification Solutions](https://docs.microsoft.com/previous-versions/sql/sql-server-2005/ms171065(v%3dsql.90)).
-
- > [!NOTE]
- > The <xref:Microsoft.Data.SqlClient.SqlDependency.OnChange> event may be generated on a different thread from the thread that initiated command execution.
-
- Query notifications are supported only for SELECT statements that meet a list of specific requirements.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDependency.#ctor">
- <summary>Creates a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> class with the default settings.</summary><remarks>
- <format type="text/markdown">< and [Working with Query Notifications](/sql/connect/oledb/features/working-with-query-notifications).
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDependency.#ctor(Microsoft.Data.SqlClient.SqlCommand)">
- <param name="command">The <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object to associate with this <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> object. The constructor will set up a <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> object and bind it to the command.</param><summary>Creates a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> class and associates it with the <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> parameter.</summary><remarks>
- <format type="text/markdown">< and [Working with Query Notifications](/sql/connect/oledb/features/working-with-query-notifications).
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="command" /> parameter is NULL.</exception><exception cref="T:System.InvalidOperationException">The <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object already has a <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> object assigned to its <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Notification" /> property, and that <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> is not associated with this dependency.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDependency.#ctor(Microsoft.Data.SqlClient.SqlCommand,System.String,System.Int32)">
- <param name="command">The <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object to associate with this <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> object. The constructor sets up a <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> object and bind it to the command.</param><param name="options">The notification request options to be used by this dependency. <see langword="null" /> to use the default service.</param><param name="timeout">The time-out for this notification in seconds. The default is 0, indicating that the server's time-out should be used.</param><summary>Creates a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> class, associates it with the <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> parameter, and specifies notification options and a time-out value.</summary><remarks>
- <format type="text/markdown">< and [Working with Query Notifications](/sql/connect/oledb/features/working-with-query-notifications).
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="command" /> parameter is NULL.</exception><exception cref="T:System.ArgumentOutOfRangeException">The time-out value is less than zero.</exception><exception cref="T:System.InvalidOperationException">The <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object already has a <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> object assigned to its <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Notification" /> property and that <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> is not associated with this dependency.
-
- An attempt was made to create a **SqlDependency** instance from within SQLCLR.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDependency.HasChanges">
- <summary>Gets a value that indicates whether one of the result sets associated with the dependency has changed.</summary><value>A Boolean value indicating whether one of the result sets has changed.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- If you are not using the <xref:Microsoft.Data.SqlClient.SqlDependency.OnChange> event, you can check the <xref:Microsoft.Data.SqlClient.SqlDependency.HasChanges%2A> property to determine if the query results have changed.
-
- The <xref:Microsoft.Data.SqlClient.SqlDependency.HasChanges%2A> property does not necessarily imply a change in the data. Other circumstances, such as time-out expired and failure to set the notification request, also generate a change event.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlDependency.Id">
- <summary>Gets a value that uniquely identifies this instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> class.</summary><value>A string representation of a GUID that is generated for each instance of the <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> class.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlDependency.Id%2A> property is used to uniquely identify a given <xref:Microsoft.Data.SqlClient.SqlDependency> instance.
-
- ]]></format>
- </remarks>
- </member>
- <member name="E:Microsoft.Data.SqlClient.SqlDependency.OnChange">
- <summary>Occurs when a notification is received for any of the commands associated with this <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> object.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlDependency.OnChange> occurs when the results for the associated command change. If you are not using <xref:Microsoft.Data.SqlClient.SqlDependency.OnChange>, you can check the <xref:Microsoft.Data.SqlClient.SqlDependency.HasChanges%2A> property to determine whether the query results have changed.
-
- The <xref:Microsoft.Data.SqlClient.SqlDependency.OnChange> event does not necessarily imply a change in the data. Other circumstances, such as time-out expired and failure to set the notification request, also generate <xref:Microsoft.Data.SqlClient.SqlDependency.OnChange>.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDependency.AddCommandDependency(Microsoft.Data.SqlClient.SqlCommand)">
- <param name="command">A <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object containing a statement that is valid for notifications.</param><summary>Associates a <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object with this <see cref="T:Microsoft.Data.SqlClient.SqlDependency" /> instance.</summary><remarks>
- <format type="text/markdown">< and [Working with Query Notifications](/sql/connect/oledb/features/working-with-query-notifications).
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="command" /> parameter is null.</exception><exception cref="T:System.InvalidOperationException">The <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> object already has a <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> object assigned to its <see cref="P:Microsoft.Data.SqlClient.SqlCommand.Notification" /> property, and that <see cref="T:Microsoft.Data.Sql.SqlNotificationRequest" /> is not associated with this dependency.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDependency.Start(System.String)">
- <param name="connectionString">The connection string for the instance of SQL Server from which to obtain change notifications.</param><summary>Starts the listener for receiving dependency change notifications from the instance of SQL Server specified by the connection string.</summary><returns>
- <see langword="true" /> if the listener initialized successfully; <see langword="false" /> if a compatible listener already exists.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This method starts the listener for the <xref:System.AppDomain> for receiving dependency notifications from the instance of SQL Server specified by the `connectionString` parameter. This method may be called more than once with different connection strings for multiple servers.
-
- For additional remarks, see <xref:Microsoft.Data.SqlClient.SqlDependency.Start%2A>.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="connectionString" /> parameter is NULL.</exception><exception cref="T:System.InvalidOperationException">The <paramref name="connectionString" /> parameter is the same as a previous call to this method, but the parameters are different.
-
- The method was called from within the CLR.</exception><exception cref="T:System.Security.SecurityException">The caller does not have the required <see cref="T:Microsoft.Data.SqlClient.SqlClientPermission" /> code access security (CAS) permission.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">A subsequent call to the method has been made with an equivalent <paramref name="connectionString" /> parameter with a different user, or a user that does not default to the same schema.
-
- Also, any underlying **SqlClient** exceptions.</exception><altmember cref="P:Microsoft.Data.SqlClient.SqlConnection.ConnectionString" />
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDependency.Start(System.String,System.String)">
- <param name="connectionString">The connection string for the instance of SQL Server from which to obtain change notifications.</param><param name="queue">An existing SQL Server Service Broker queue to be used. If <see langword="null" />, the default queue is used.</param><summary>Starts the listener for receiving dependency change notifications from the instance of SQL Server specified by the connection string using the specified SQL Server Service Broker queue.</summary><returns>
- <see langword="true" /> if the listener initialized successfully; <see langword="false" /> if a compatible listener already exists.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This method starts the listener for the <xref:System.AppDomain> for receiving dependency notifications from the instance of SQL Server specified by the `connectionString` parameter. This method may be called more than once with different connection strings for multiple servers.
-
- If no queue name is specified, <xref:Microsoft.Data.SqlClient.SqlDependency> creates a temporary queue and service in the server that is used for the entire process, even if the process involves more than one <xref:System.AppDomain>. The queue and service are automatically removed upon application shutdown.
-
- For additional remarks, see <xref:Microsoft.Data.SqlClient.SqlDependency.Start%2A>.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="connectionString" /> parameter is NULL.</exception><exception cref="T:System.InvalidOperationException">The <paramref name="connectionString" /> parameter is the same as a previous call to this method, but the parameters are different.
-
- The method was called from within the CLR.</exception><exception cref="T:System.Security.SecurityException">The caller does not have the required <see cref="T:Microsoft.Data.SqlClient.SqlClientPermission" /> code access security (CAS) permission.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">A subsequent call to the method has been made with an equivalent <paramref name="connectionString" /> parameter but a different user, or a user that does not default to the same schema.
-
- Also, any underlying **SqlClient** exceptions.</exception><altmember cref="P:Microsoft.Data.SqlClient.SqlConnection.ConnectionString" />
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDependency.Stop(System.String)">
- <param name="connectionString">Connection string for the instance of SQL Server that was used in a previous <see cref="M:Microsoft.Data.SqlClient.SqlDependency.Start(System.String)" /> call.</param><summary>Stops a listener for a connection specified in a previous <see cref="o:Microsoft.Data.SqlClient.SqlDependency.Start" /> call.</summary><returns>
- <see langword="true" /> if the listener was completely stopped; <see langword="false" /> if the <see cref="T:System.AppDomain" /> was unbound from the listener, but there are is at least one other <see cref="T:System.AppDomain" /> using the same listener.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlDependency.Stop%2A> method must be called for each <xref:Microsoft.Data.SqlClient.SqlDependency.Start%2A> call. A given listener only shuts down fully when it receives the same number of <xref:Microsoft.Data.SqlClient.SqlDependency.Stop%2A> requests as <xref:Microsoft.Data.SqlClient.SqlDependency.Start%2A> requests.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="connectionString" /> parameter is NULL.</exception><exception cref="T:System.InvalidOperationException">The method was called from within SQLCLR.</exception><exception cref="T:System.Security.SecurityException">The caller does not have the required <see cref="T:Microsoft.Data.SqlClient.SqlClientPermission" /> code access security (CAS) permission.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">An underlying **SqlClient** exception occurred.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlDependency.Stop(System.String,System.String)">
- <param name="connectionString">Connection string for the instance of SQL Server that was used in a previous <see cref="M:Microsoft.Data.SqlClient.SqlDependency.Start(System.String,System.String)" /> call.</param><param name="queue">The SQL Server Service Broker queue that was used in a previous <see cref="M:Microsoft.Data.SqlClient.SqlDependency.Start(System.String,System.String)" /> call.</param><summary>Stops a listener for a connection specified in a previous <see cref="o:Microsoft.Data.SqlClient.SqlDependency.Start" /> call.</summary><returns>
- <see langword="true" /> if the listener was completely stopped; <see langword="false" /> if the <see cref="T:System.AppDomain" /> was unbound from the listener, but there is at least one other <see cref="T:System.AppDomain" /> using the same listener.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlDependency.Stop%2A> method must be called for each <xref:Microsoft.Data.SqlClient.SqlDependency.Start%2A> call. A given listener only shuts down fully when it receives the same number of <xref:Microsoft.Data.SqlClient.SqlDependency.Stop%2A> requests as <xref:Microsoft.Data.SqlClient.SqlDependency.Start%2A> requests.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="connectionString" /> parameter is NULL.</exception><exception cref="T:System.InvalidOperationException">The method was called from within SQLCLR.</exception><exception cref="T:System.Security.SecurityException">The caller does not have the required <see cref="T:Microsoft.Data.SqlClient.SqlClientPermission" /> code access security (CAS) permission.</exception><exception cref="T:Microsoft.Data.SqlClient.SqlException">And underlying **SqlClient** exception occurred.</exception>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlError">
- <summary>Collects information relevant to a warning or error returned by SQL Server.</summary><remarks>
- <format type="text/markdown"><. For more information about severity levels, see [Database Engine Error Severities](https://msdn.microsoft.com/library/ms164086.aspx).
-
-
-
- ## Examples
- The following example displays each <xref:Microsoft.Data.SqlClient.SqlError> within the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> collection.
-
- [!code-csharp[SqlError_ToString Example#1](~/../sqlclient/doc/samples/SqlError_ToString.cs#1)]
-
- ]]></format>
- </remarks><altmember cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" /><altmember cref="T:Microsoft.Data.SqlClient.SqlException" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlError.Class">
- <summary>Gets the severity level of the error returned from SQL Server.</summary><value>A value from 1 to 25 that indicates the severity level of the error. The default is 0.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example displays each <xref:Microsoft.Data.SqlClient.SqlError> within the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> collection.
-
- [!code-csharp[SqlError_State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlError.LineNumber">
- <summary>Gets the line number within the Transact-SQL command batch or stored procedure that contains the error.</summary><value>The line number within the Transact-SQL command batch or stored procedure that contains the error.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example displays each <xref:Microsoft.Data.SqlClient.SqlError> within the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> collection.
-
- [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlError.Message">
- <summary>Gets the text describing the error.</summary><value>The text describing the error. For more information on errors generated by SQL Server, see <see href="/sql/relational-databases/errors-events/database-engine-events-and-errors">Database Engine Events and Errors</see>.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlError.Number">
- <summary>Gets a number that identifies the type of error.</summary><value>The number that identifies the type of error.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example displays each <xref:Microsoft.Data.SqlClient.SqlError> within the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> collection.
-
- [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlError.Procedure">
- <summary>Gets the name of the stored procedure or remote procedure call (RPC) that generated the error.</summary><value>The name of the stored procedure or RPC. For more information on errors generated by SQL Server, see <see href="/sql/relational-databases/errors-events/database-engine-events-and-errors">Database Engine Events and Errors</see>.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlError.Server">
- <summary>Gets the name of the instance of SQL Server that generated the error.</summary><value>The name of the instance of SQL Server.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlError.Source">
- <summary>Gets the name of the provider that generated the error.</summary><value>The name of the provider that generated the error.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlError.State">
- <summary>Some error messages can be raised at multiple points in the code for the Database Engine. For example, an 1105 error can be raised for several different conditions. Each specific condition that raises an error assigns a unique state code.</summary><value>The state code.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example displays each <xref:Microsoft.Data.SqlClient.SqlError> within the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> collection.
-
- [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlError.ToString">
- <summary>Gets the complete text of the error message.</summary><returns>The complete text of the error.</returns><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlErrorCollection">
- <summary>Collects all errors generated by the .NET Framework Data Provider for SQL Server. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="T:Microsoft.Data.SqlClient.SqlError" /><altmember cref="T:Microsoft.Data.SqlClient.SqlException" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlErrorCollection.Count">
- <summary>Gets the number of errors in the collection.</summary><value>The total number of errors in the collection.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlErrorCollection.Item(System.Int32)">
- <param name="index">The zero-based index of the error to retrieve.</param><summary>Gets the error at the specified index.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.SqlError" /> that contains the error at the specified index.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">Index parameter is outside array bounds.</exception><altmember cref="P:Microsoft.Data.SqlClient.SqlErrorCollection.Count" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlErrorCollection.System#Collections#ICollection#IsSynchronized">
- <summary>For a description of this member, see <see cref="P:System.Collections.ICollection.IsSynchronized" />.</summary><value>
- <see langword="true" /> if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This member is an explicit interface member implementation. It can be used only when the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> instance is cast to an <xref:System.Collections.ICollection> interface.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlErrorCollection.System#Collections#ICollection#SyncRoot">
- <summary>For a description of this member, see <see cref="P:System.Collections.ICollection.SyncRoot" />.</summary><value>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This member is an explicit interface member implementation. It can be used only when the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> instance is cast to an <xref:System.Collections.ICollection> interface.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlErrorCollection.CopyTo(System.Array,System.Int32)">
- <param name="array">The <see cref="T:System.Array" /> to copy elements into.</param><param name="index">The index from which to start copying into the <paramref name="array" /> parameter.</param><summary>Copies the elements of the <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" /> collection into an <see cref="T:System.Array" />, starting at the specified index.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">The sum of <paramref name="index" /> and the number of elements in the <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" /> collection is greater than the <see cref="P:System.Array.Length" /> of the <see cref="T:System.Array" />.</exception><exception cref="T:System.ArgumentNullException">The <paramref name="array" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="index" /> is not valid for <paramref name="array" />.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlErrorCollection.CopyTo(Microsoft.Data.SqlClient.SqlError[],System.Int32)">
- <param name="array">The <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" /> to copy the elements into.</param><param name="index">The index from which to start copying into the <paramref name="array" /> parameter.</param><summary>Copies the elements of the <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" /> collection into a <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" />, starting at the specified index.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">The sum of <paramref name="index" /> and the number of elements in the <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" /> collection is greater than the length of the <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" />.</exception><exception cref="T:System.ArgumentNullException">The <paramref name="array" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="index" /> is not valid for <paramref name="array" />.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlErrorCollection.GetEnumerator">
- <summary>Returns an enumerator that iterates through the <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" />.</summary><returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Enumerators can be used to read the data in a collection, but they cannot be used to modify the underlying collection.
-
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlException">
- <summary>The exception that is thrown when SQL Server returns a warning or error. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><. The <xref:Microsoft.Data.SqlClient.SqlException> class maps to SQL Server severity.
-
- The following is general information on handling exceptions. Your code should catch exceptions to prevent the application from crashing and to allow displaying a relevant error message to the user. You can use database transactions to ensure that the data is consistent regardless of what happens in the client application (including a crash). Features like System.Transaction.TransactionScope or the BeginTransaction method (in System.Data.OleDb.OleDbConnection, System.Data.ODBC.ODBCConnection, and Microsoft.Data.SqlClient.SqlConnection) ensure consistent data regardless of exceptions raised by a provider. Transactions can fail, so catch failures and retry the transaction.
-
- Note that beginning with .NET Framework 4.5, <xref:Microsoft.Data.SqlClient.SqlException> can return an inner <xref:System.ComponentModel.Win32Exception>.
-
- The exception class of a .NET Framework data provider reports provider-specific errors. For example System.Data.Odbc has OdbcException, System.Data.OleDb has OleDbException, and Microsoft.Data.SqlClient has SqlException. For the best level of error detail, catch these exceptions and use the members of these exception classes to get details of the error.
-
- In addition to the provider-specific errors, .NET Framework data provider types can raise .NET Framework exceptions such as System.OutOfMemoryException and System.Threading.ThreadAbortException. Recovery from these exceptions may not be possible.
-
- Bad input can cause a .NET Framework data provider type to raise an exception such as System.ArgumentException or System.IndexOutOfRangeException. Calling a method at the wrong time can raise System.InvalidOperationException.
-
- So, in general, write an exception handler that catches any provider specific exceptions as well as exceptions from the common language runtime. These can be layered as follows:
-
- ```csharp
- try {
- // code here
- }
- catch (SqlException odbcEx) {
- // Handle more specific SqlException exception here.
- }
- catch (Exception ex) {
- // Handle generic ones here.
- }
-
- ```
-
- Or:
-
- ```csharp
- try {
- // code here
- }
- catch (Exception ex) {
- if (ex is SqlException) {
- // Handle more specific SqlException exception here.
- }
- else {
- // Handle generic ones here.
- }
- }
-
- ```
-
- It is also possible for a .NET Framework data provider method call to fail on a thread pool thread with no user code on the stack. In this case, and when using asynchronous method calls, you must register the <xref:System.AppDomain.UnhandledException> event to handle those exceptions and avoid application crash.
-
-
-
- ## Examples
- The following example generates a <xref:Microsoft.Data.SqlClient.SqlException> and then displays the exception.
-
- [!code-csharp[SqlException_Errors1 Example#1](~/../sqlclient/doc/samples/SqlException_Errors1.cs#1)]
-
- ]]></format>
- </remarks><altmember cref="T:Microsoft.Data.SqlClient.SqlError" /><altmember cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.Class">
- <summary>Gets the severity level of the error returned from the .NET Framework Data Provider for SQL Server.</summary><value>A value from 1 to 25 that indicates the severity level of the error.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Number" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Source" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.State" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Server" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Procedure" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.LineNumber" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.ClientConnectionId">
- <summary>Represents the client connection ID. For more information, see <see href="https://docs.microsoft.com/dotnet/framework/data/adonet/data-tracing">Data Tracing in ADO.NET</see>.</summary><value>The client connection ID.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- For a code sample, see <xref:Microsoft.Data.SqlClient.SqlException.ToString%2A>.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.Errors">
- <summary>Gets a collection of one or more <see cref="T:Microsoft.Data.SqlClient.SqlError" /> objects that give detailed information about exceptions generated by the .NET Framework Data Provider for SQL Server.</summary><value>The collected instances of the <see cref="T:Microsoft.Data.SqlClient.SqlError" /> class.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example displays each <xref:Microsoft.Data.SqlClient.SqlError> within the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> collection.
-
- [!code-csharp[SqlError_ToString Example#1](~/../sqlclient/doc/samples/SqlError_ToString.cs#1)]
-
- ]]></format>
- </remarks><altmember cref="T:Microsoft.Data.SqlClient.SqlErrorCollection" /><altmember cref="T:Microsoft.Data.SqlClient.SqlError" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.LineNumber">
- <summary>Gets the line number within the Transact-SQL command batch or stored procedure that generated the error.</summary><value>The line number within the Transact-SQL command batch or stored procedure that generated the error.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Number" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Source" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.State" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Class" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Server" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Procedure" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.Number">
- <summary>Gets a number that identifies the type of error.</summary><value>The number that identifies the type of error.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example displays each <xref:Microsoft.Data.SqlClient.SqlError> within the <xref:Microsoft.Data.SqlClient.SqlErrorCollection> collection.
-
- [!code-csharp[SqlException_Errors2 Example#1](~/../sqlclient/doc/samples/SqlException_Errors2.cs#1)]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlException.State" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Class" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Source" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Server" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Procedure" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.LineNumber" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.Procedure">
- <summary>Gets the name of the stored procedure or remote procedure call (RPC) that generated the error.</summary><value>The name of the stored procedure or RPC.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Number" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.State" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Class" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Server" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Source" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.LineNumber" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.Server">
- <summary>Gets the name of the computer that is running an instance of SQL Server that generated the error.</summary><value>The name of the computer running an instance of SQL Server.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Number" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.State" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Source" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Class" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Procedure" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.LineNumber" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.Source">
- <summary>Gets the name of the provider that generated the error.</summary><value>The name of the provider that generated the error.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Number" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.State" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Class" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Server" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Procedure" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.LineNumber" />
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlException.State">
- <summary>Gets a numeric error code from SQL Server that represents an error, warning or "no data found" message. For more information about how to decode these values, see <see href="/sql/relational-databases/errors-events/database-engine-events-and-errors">Database Engine Events and Errors</see>.</summary><value>The number representing the error code.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Number" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Class" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Source" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Server" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.Procedure" /><altmember cref="P:Microsoft.Data.SqlClient.SqlException.LineNumber" />
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <param name="si">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param><param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param><summary>Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- `GetObjectData` sets a `SerializationInfo` with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the `SerializationInfo` transmitted over the stream.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="si" /> parameter is a null reference (<see langword="Nothing" /> in Visual Basic).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlException.ToString">
- <summary>Returns a string that represents the current <see cref="T:Microsoft.Data.SqlClient.SqlException" /> object, and includes the client connection ID (for more information, see <see cref="P:Microsoft.Data.SqlClient.SqlException.ClientConnectionId" />).</summary><returns>A string that represents the current <see cref="T:Microsoft.Data.SqlClient.SqlException" /> object.<see cref="T:System.String" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Examples
- The following C# example shows how a connection attempt to a valid server but non-existent database causes a <xref:Microsoft.Data.SqlClient.SqlException>, which includes the client connection ID:
-
- ```csharp
- using Microsoft.Data.SqlClient;
- using System;
-
- public class A {
- public static void Main() {
- SqlConnection connection = new SqlConnection();
- connection.ConnectionString = "Data Source=a_valid_server;Initial Catalog=Northwinda;Integrated Security=true";
- try {
- connection.Open();
- }
- catch (SqlException p) {
- Console.WriteLine("{0}", p.ClientConnectionId);
- Console.WriteLine("{0}", p.ToString());
- }
- connection.Close();
- }
- }
- ```
-
- The following Visual Basic sample is functionally equivalent to the previous (C#) sample:
-
- ```vb
- Imports Microsoft.Data.SqlClient
- Imports System
-
- Module Module1
-
- Sub Main()
- Dim connection As New SqlConnection()
- connection.ConnectionString = "Data Source=a_valid_server;Initial Catalog=Northwinda;Integrated Security=true"
- Try
- connection.Open()
- Catch p As SqlException
- Console.WriteLine("{0}", p.ClientConnectionId)
- Console.WriteLine("{0}", p.ToString())
- End Try
- connection.Close()
- End Sub
-
- End Module
- ```
-
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlInfoMessageEventArgs">
- <summary>Provides data for the <see cref="E:Microsoft.Data.SqlClient.SqlConnection.InfoMessage" /> event.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlConnection.InfoMessage> event contains a <xref:Microsoft.Data.SqlClient.SqlErrorCollection> collection which contains the warnings sent from the server.
-
- An <xref:Microsoft.Data.SqlClient.SqlConnection.InfoMessage> event is generated when a SQL Server message with a severity level of 10 or less occurs.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlInfoMessageEventArgs.Errors">
- <summary>Gets the collection of warnings sent from the server.</summary><value>The collection of warnings sent from the server.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlInfoMessageEventArgs.Message">
- <summary>Gets the full text of the error sent from the database.</summary><value>The full text of the error.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This is a wrapper for the <xref:Microsoft.Data.SqlClient.SqlError.Message%2A> property of the first <xref:Microsoft.Data.SqlClient.SqlError> in the <xref:Microsoft.Data.SqlClient.SqlInfoMessageEventArgs.Errors%2A> collection.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlInfoMessageEventArgs.Source">
- <summary>Gets the name of the object that generated the error.</summary><value>The name of the object that generated the error.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This is a wrapper for the <xref:Microsoft.Data.SqlClient.SqlError.Source%2A> property of the first <xref:Microsoft.Data.SqlClient.SqlError> in the <xref:Microsoft.Data.SqlClient.SqlInfoMessageEventArgs.Errors%2A> collection.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlInfoMessageEventArgs.ToString">
- <summary>Retrieves a string representation of the <see cref="E:Microsoft.Data.SqlClient.SqlConnection.InfoMessage" /> event.</summary><returns>A string representing the <see cref="E:Microsoft.Data.SqlClient.SqlConnection.InfoMessage" /> event.</returns><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlInfoMessageEventHandler">
- <param name="sender">The source of the event.</param><param name="e">A <see cref="T:Microsoft.Data.SqlClient.SqlInfoMessageEventArgs" /> object that contains the event data.</param><summary>Represents the method that will handle the <see cref="E:Microsoft.Data.SqlClient.SqlConnection.InfoMessage" /> event of a <see cref="T:Microsoft.Data.SqlClient.SqlConnection" />.</summary><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlNotificationEventArgs">
- <summary>Represents the set of arguments passed to the notification event handler.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlNotificationEventArgs.#ctor(Microsoft.Data.SqlClient.SqlNotificationType,Microsoft.Data.SqlClient.SqlNotificationInfo,Microsoft.Data.SqlClient.SqlNotificationSource)">
- <param name="type">
- <see cref="T:Microsoft.Data.SqlClient.SqlNotificationType" /> value that indicates whether this notification is generated because of an actual change, or by the subscription.</param><param name="info">
- <see cref="T:Microsoft.Data.SqlClient.SqlNotificationInfo" /> value that indicates the reason for the notification event. This may occur because the data in the store actually changed, or the notification became invalid (for example, it timed out).</param><param name="source">
- <see cref="T:Microsoft.Data.SqlClient.SqlNotificationSource" /> value that indicates the source that generated the notification.</param><summary>Creates a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlNotificationEventArgs" /> object.</summary><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlNotificationEventArgs.Info">
- <summary>Gets a value that indicates the reason for the notification event, such as a row in the database being modified or a table being truncated.</summary><value>The notification event reason.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This event may occur because the data in the store actually changed, or the notification is no longer valid (for example, it timed out).
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlNotificationEventArgs.Source">
- <summary>Gets a value that indicates the source that generated the notification, such as a change to the query data or the database's state.</summary><value>The source of the notification.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlNotificationEventArgs.Type">
- <summary>Gets a value that indicates whether this notification is generated because of an actual change, or by the subscription.</summary><value>A value indicating whether the notification was generated by a change or a subscription.</value><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlNotificationInfo">
- <summary>This enumeration provides additional information about the different notifications that can be received by the dependency event handler.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlNotificationInfo> enumeration is referenced by an instance of the <xref:Microsoft.Data.SqlClient.SqlNotificationEventArgs> class.
-
- ]]></format>
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.AlreadyChanged">
- <summary>The <see langword="SqlDependency" /> object already fired, and new commands cannot be added to it.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Alter">
- <summary>An underlying server object related to the query was modified.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Delete">
- <summary>Data was changed by a DELETE statement.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Drop">
- <summary>An underlying object related to the query was dropped.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Error">
- <summary>An internal server error occurred.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Expired">
- <summary>The <see langword="SqlDependency" /> object has expired.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Insert">
- <summary>Data was changed by an INSERT statement.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Invalid">
- <summary>A statement was provided that cannot be notified (for example, an UPDATE statement).</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Isolation">
- <summary>The statement was executed under an isolation mode that was not valid (for example, Snapshot).</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Merge">
- <summary>Used to distinguish the server-side cause for a query notification firing.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Options">
- <summary>The SET options were not set appropriately at subscription time.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.PreviousFire">
- <summary>A previous statement has caused query notifications to fire under the current transaction.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Query">
- <summary>A SELECT statement that cannot be notified or was provided.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Resource">
- <summary>Fires as a result of server resource pressure.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Restart">
- <summary>The server was restarted (notifications are sent during restart.).</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.TemplateLimit">
- <summary>The subscribing query causes the number of templates on one of the target tables to exceed the maximum allowable limit.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Truncate">
- <summary>One or more tables were truncated.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Unknown">
- <summary>Used when the info option sent by the server was not recognized by the client.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationInfo.Update">
- <summary>Data was changed by an UPDATE statement.</summary>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlNotificationSource">
- <summary>Indicates the source of the notification received by the dependency event handler.</summary><remarks>
- <format type="text/markdown">< and [Working with Query Notifications](/sql/connect/oledb/features/working-with-query-notifications).
-
- ]]></format>
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Client">
- <summary>A client-initiated notification occurred, such as a client-side time-out or as a result of attempting to add a command to a dependency that has already fired.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Data">
- <summary>Data has changed; for example, an insert, update, delete, or truncate operation occurred.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Database">
- <summary>The database state changed; for example, the database related to the query was dropped or detached.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Environment">
- <summary>The run-time environment was not compatible with notifications; for example, the isolation level was set to snapshot, or one or more SET options are not compatible.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Execution">
- <summary>A run-time error occurred during execution.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Object">
- <summary>A database object changed; for example, an underlying object related to the query was dropped or modified.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Owner">
- <summary>Internal only; not intended to be used in your code.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Statement">
- <summary>The Transact-SQL statement is not valid for notifications; for example, a SELECT statement that could not be notified or a non-SELECT statement was executed.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.System">
- <summary>A system-related event occurred. For example, there was an internal error, the server was restarted, or resource pressure caused the invalidation.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Timeout">
- <summary>The subscription time-out expired.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationSource.Unknown">
- <summary>Used when the source option sent by the server was not recognized by the client.</summary>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlNotificationType">
- <summary>Describes the different notification types that can be received by an <see cref="T:Microsoft.Data.SqlClient.OnChangeEventHandler" /> event handler through the <see cref="T:Microsoft.Data.SqlClient.SqlNotificationEventArgs" /> parameter.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlNotificationType> enumeration is referenced by an instance of the <xref:Microsoft.Data.SqlClient.SqlNotificationEventArgs> class. This information is provided when a notification event is fired with the <xref:Microsoft.Data.SqlClient.SqlDependency> class.
-
- ]]></format>
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationType.Change">
- <summary>Data on the server being monitored changed. Use the <see cref="T:Microsoft.Data.SqlClient.SqlNotificationInfo" /> item to determine the details of the change.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationType.Subscribe">
- <summary>There was a failure to create a notification subscription. Use the <see cref="T:Microsoft.Data.SqlClient.SqlNotificationEventArgs" /> object's <see cref="T:Microsoft.Data.SqlClient.SqlNotificationInfo" /> item to determine the cause of the failure.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.SqlNotificationType.Unknown">
- <summary>Used when the type option sent by the server was not recognized by the client.</summary>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlParameter">
- <summary>Represents a parameter to a <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> and optionally its mapping to <see cref="T:System.Data.DataSet" /> columns. This class cannot be inherited. For more information on parameters, see [Configuring Parameters and Parameter Data Types](~/docs/framework/data/adonet/configuring-parameters-and-parameter-data-types.md).</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Parameter names are not case sensitive.
-
- > [!NOTE]
- > Nameless, also called ordinal, parameters are not supported by the .NET Framework Data Provider for SQL Server.
-
- For more information, along with additional sample code demonstrating how to use parameters, see [Commands and Parameters](~/docs/framework/data/adonet/commands-and-parameters.md).
-
-
-
- ## Examples
- The following example creates multiple instances of <xref:Microsoft.Data.SqlClient.SqlParameter> through the <xref:Microsoft.Data.SqlClient.SqlParameterCollection> collection within the <xref:Microsoft.Data.SqlClient.SqlDataAdapter>. These parameters are used to select data from the data source and put the data in the <xref:System.Data.DataSet>. This example assumes that a <xref:System.Data.DataSet> and a <xref:Microsoft.Data.SqlClient.SqlDataAdapter> have already been created by using the appropriate schema, commands, and connection. For more information and additional examples on using parameters, see [Retrieving and Modifying Data in ADO.NET](~/docs/framework/data/adonet/retrieving-and-modifying-data.md) and [Configuring Parameters and Parameter Data Types](~/docs/framework/data/adonet/configuring-parameters-and-parameter-data-types.md).
-
- [!code-csharp[SqlParameterCollection_Add6](~/../sqlclient/doc/samples/SqlParameterCollection_Add6.cs#1)]
-
- ]]></format>
- </remarks><altmember cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /><altmember cref="T:Microsoft.Data.SqlClient.SqlCommand" />
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.#ctor">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> class.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.#ctor(System.String,System.Data.SqlDbType)">
- <param name="parameterName">The name of the parameter to map.</param><param name="dbType">One of the <see cref="T:System.Data.SqlDbType" /> values.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> class that uses the parameter name and the data type.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The value supplied in the <paramref name="dbType" /> parameter is an invalid back-end data type.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.#ctor(System.String,System.Data.SqlDbType,System.Int32)">
- <param name="parameterName">The name of the parameter to map.</param><param name="dbType">One of the <see cref="T:System.Data.SqlDbType" /> values.</param><param name="size">The length of the parameter.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> class that uses the parameter name, the <see cref="T:System.Data.SqlDbType" />, and the size.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The value supplied in the <paramref name="dbType" /> parameter is an invalid back-end data type.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.#ctor(System.String,System.Data.SqlDbType,System.Int32,System.Data.ParameterDirection,System.Boolean,System.Byte,System.Byte,System.String,System.Data.DataRowVersion,System.Object)">
- <param name="parameterName">The name of the parameter to map.</param><param name="dbType">One of the <see cref="T:System.Data.SqlDbType" /> values.</param><param name="size">The length of the parameter.</param><param name="direction">One of the <see cref="T:System.Data.ParameterDirection" /> values.</param><param name="isNullable">
- <see langword="true" /> if the value of the field can be null; otherwise, <see langword="false" />.</param><param name="precision">The total number of digits to the left and right of the decimal point to which <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> is resolved.</param><param name="scale">The total number of decimal places to which <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> is resolved.</param><param name="sourceColumn">The name of the source column (<see cref="P:Microsoft.Data.SqlClient.SqlParameter.SourceColumn" />) if this <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> is used in a call to <see cref="o:System.Data.Common.DbDataAdapter.Update" />.</param><param name="sourceVersion">One of the <see cref="T:System.Data.DataRowVersion" /> values.</param><param name="value">An <see cref="T:System.Object" /> that is the value of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> class that uses the parameter name, the type of the parameter, the size of the parameter, a <see cref="T:System.Data.ParameterDirection" />, the precision of the parameter, the scale of the parameter, the source column, a <see cref="T:System.Data.DataRowVersion" /> to use, and the value of the parameter.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The value supplied in the <paramref name="dbType" /> parameter is an invalid back-end data type.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.#ctor(System.String,System.Data.SqlDbType,System.Int32,System.Data.ParameterDirection,System.Byte,System.Byte,System.String,System.Data.DataRowVersion,System.Boolean,System.Object,System.String,System.String,System.String)">
- <param name="parameterName">The name of the parameter to map.</param><param name="dbType">One of the <see cref="T:System.Data.SqlDbType" /> values.</param><param name="size">The length of the parameter.</param><param name="direction">One of the <see cref="T:System.Data.ParameterDirection" /> values.</param><param name="precision">The total number of digits to the left and right of the decimal point to which <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> is resolved.</param><param name="scale">The total number of decimal places to which <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> is resolved.</param><param name="sourceColumn">The name of the source column (<see cref="P:Microsoft.Data.SqlClient.SqlParameter.SourceColumn" />) if this <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> is used in a call to <see cref="o:System.Data.Common.DbDataAdapter.Update" />.</param><param name="sourceVersion">One of the <see cref="T:System.Data.DataRowVersion" /> values.</param><param name="sourceColumnNullMapping">
- <see langword="true" /> if the source column is nullable; <see langword="false" /> if it is not.</param><param name="value">An <see cref="T:System.Object" /> that is the value of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</param><param name="xmlSchemaCollectionDatabase">The name of the database where the schema collection for this XML instance is located.</param><param name="xmlSchemaCollectionOwningSchema">The owning relational schema where the schema collection for this XML instance is located.</param><param name="xmlSchemaCollectionName">The name of the schema collection for this parameter.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> class that uses the parameter name, the type of the parameter, the length of the parameter the direction, the precision, the scale, the name of the source column, one of the <see cref="T:System.Data.DataRowVersion" /> values, a Boolean for source column mapping, the value of the <see langword="SqlParameter" />, the name of the database where the schema collection for this XML instance is located, the owning relational schema where the schema collection for this XML instance is located, and the name of the schema collection for this parameter.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlParameter.Size%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A> are inferred from the value of the `dbType` parameter if they are not explicitly set in the `size` and `precision` parameters.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.#ctor(System.String,System.Data.SqlDbType,System.Int32,System.String)">
- <param name="parameterName">The name of the parameter to map.</param><param name="dbType">One of the <see cref="T:System.Data.SqlDbType" /> values.</param><param name="size">The length of the parameter.</param><param name="sourceColumn">The name of the source column (<see cref="P:Microsoft.Data.SqlClient.SqlParameter.SourceColumn" />) if this <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> is used in a call to <see cref="o:System.Data.Common.DbDataAdapter.Update" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> class that uses the parameter name, the <see cref="T:System.Data.SqlDbType" />, the size, and the source column name.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The value supplied in the <paramref name="dbType" /> parameter is an invalid back-end data type.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.#ctor(System.String,System.Object)">
- <param name="parameterName">The name of the parameter to map.</param><param name="value">An <see cref="T:System.Object" /> that is the value of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> class that uses the parameter name and a value of the new <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.CompareInfo">
- <summary>Gets or sets the <see cref="T:System.Globalization.CompareInfo" /> object that defines how string comparisons should be performed for this parameter.</summary><value>A <see cref="T:System.Globalization.CompareInfo" /> object that defines string comparison for this parameter.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.DbType">
- <summary>Gets or sets the <see cref="T:System.Data.SqlDbType" /> of the parameter.</summary><value>One of the <see cref="T:System.Data.SqlDbType" /> values. The default is <see langword="NVarChar" />.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlParameter> and sets some of its properties.
-
- [!code-csharp[SqlParameter_IsNullable Example#1](~/../sqlclient/doc/samples/SqlParameter_IsNullable.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.Direction">
- <summary>Gets or sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.</summary><value>One of the <see cref="T:System.Data.ParameterDirection" /> values. The default is <see langword="Input" />.</value><remarks>
- <format type="text/markdown"><
-
- [DataAdapter Parameters](~/docs/framework/data/adonet/dataadapter-parameters.md)
-
- [SQL Server and ADO.NET](~/docs/framework/data/adonet/sql/index.md)
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The property was not set to one of the valid <see cref="T:System.Data.ParameterDirection" /> values.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.IsNullable">
- <summary>Gets or sets a value that indicates whether the parameter accepts null values. <see cref="P:Microsoft.Data.SqlClient.SqlParameter.IsNullable" /> is not used to validate the parameter's value and will not prevent sending or receiving a null value when executing a command.</summary><value>
- <see langword="true" /> if null values are accepted; otherwise, <see langword="false" />. The default is <see langword="false" />.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.LocaleId">
- <summary>Gets or sets the locale identifier that determines conventions and language for a particular region.</summary><value>The locale identifier associated with the parameter.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The locale identifies conventions and language for a particular geographical region. The codepage used to encode a specific string (the character set) is based on the locale used by that string or the environment that produced it. This property sets (for input parameters) or gets (for output parameters) the locale to be attached to a string when exchanging data with the server. This property is typically used together with the <xref:Microsoft.Data.SqlClient.SqlParameter.CompareInfo%2A> property.
-
- ```csharp
- static void CreateSqlParameterLocaleId(){
- SqlParameter parameter = new SqlParameter("pName", SqlDbType.VarChar);
- parameter.LocaleId = 1033; // English - United States
- }
- ```
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.Offset">
- <summary>Gets or sets the offset to the <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> property.</summary><value>The offset to the <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />. The default is 0.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.ParameterName">
- <summary>Gets or sets the name of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</summary><value>The name of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />. The default is an empty string.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.Precision">
- <summary>Gets or sets the maximum number of digits used to represent the <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> property.</summary><value>The maximum number of digits used to represent the <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> property. The default value is 0. This indicates that the data provider sets the precision for <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A> property is used by parameters that have a <xref:System.Data.SqlDbType> of `Decimal`.
-
- You do not need to specify values for the <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> properties for input parameters, as they can be inferred from the parameter value. `Precision` and `Scale` are required for output parameters and for scenarios where you need to specify complete metadata for a parameter without indicating a value, such as specifying a null value with a specific precision and scale.
-
- > [!NOTE]
- > Use of this property to coerce data passed to the database is not supported. To round, truncate, or otherwise coerce data before passing it to the database, use the <xref:System.Math> class that is part of the `System` namespace prior to assigning a value to the parameter's `Value` property.
-
- > [!NOTE]
- > Microsoft .NET Framework data providers that are included with the .NET Framework version 1.0 do not verify the <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A> or <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> of <xref:System.Decimal> parameter values. This can cause truncated data being inserted at the data source. If you are using .NET Framework version 1.0, validate the <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> of <xref:System.Decimal> values before setting the parameter value. When you use .NET Framework version 1.1 or a later version, an exception is thrown if a <xref:System.Decimal> parameter value is set with an invalid <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A>. <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> values that exceed the <xref:System.Decimal> parameter scale are still truncated.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlParameter> and sets some of its properties.
-
- [!code-csharp[SqlParameter_Precision Example#1](~/../sqlclient/doc/samples/SqlParameter_Precision.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.Scale">
- <summary>Gets or sets the number of decimal places to which <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> is resolved.</summary><value>The number of decimal places to which <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /> is resolved. The default is 0.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> property is used by parameters that have a <xref:System.Data.SqlDbType> of `Decimal`.
-
- > [!WARNING]
- > Data may be truncated if the <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> property is not explicitly specified and the data on the server does not fit in scale 0 (the default).
-
- You do not need to specify values for the <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> properties for input parameters, as they can be inferred from the parameter value. `Precision` and `Scale` are required for output parameters and for scenarios where you need to specify complete metadata for a parameter without indicating a value, such as specifying a null value with a specific precision and scale.
-
- > [!NOTE]
- > Use of this property to coerce data passed to the database is not supported. To round, truncate, or otherwise coerce data before passing it to the database, use the <xref:System.Math> class that is part of the `System` namespace prior to assigning a value to the parameter's `Value` property.
-
- > [!NOTE]
- > .NET Framework data providers that are included with the .NET Framework version 1.0 do not verify the <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A> or <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> of <xref:System.Decimal> parameter values. This can cause truncated data to be inserted at the data source. If you are using .NET Framework version 1.0, validate the <xref:Microsoft.Data.SqlClient.SqlParameter.Precision%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter> of <xref:System.Decimal> values before setting the parameter value. <xref:Microsoft.Data.SqlClient.SqlParameter.Scale%2A> values that exceed the <xref:System.Decimal> parameter scale are still truncated.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlParameter> and sets some of its properties.
-
- [!code-csharp[SqlParameter#4](~/../sqlclient/doc/samples/SqlParameter.cs#4)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.Size">
- <summary>Gets or sets the maximum size, in bytes, of the data within the column.</summary><value>The maximum size, in bytes, of the data within the column. The default value is inferred from the parameter value.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlParameter> and sets some of its properties.
-
- [!code-csharp[SqlParameter#5](~/../sqlclient/doc/samples/SqlParameter.cs#5)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.SourceColumn">
- <summary>Gets or sets the name of the source column mapped to the <see cref="T:System.Data.DataSet" /> and used for loading or returning the <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /></summary><value>The name of the source column mapped to the <see cref="T:System.Data.DataSet" />. The default is an empty string.</value><remarks>
- <format type="text/markdown">< and [Updating Data Sources with DataAdapters](~/docs/framework/data/adonet/updating-data-sources-with-dataadapters.md).
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlParameter> and sets some of its properties.
-
- [!code-csharp[SqlParameter#6](~/../sqlclient/doc/samples/SqlParameter.cs#6)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.SourceColumnNullMapping">
- <summary>Sets or gets a value which indicates whether the source column is nullable. This allows <see cref="T:Microsoft.Data.SqlClient.SqlCommandBuilder" /> to correctly generate Update statements for nullable columns.</summary><value>
- <see langword="true" /> if the source column is nullable; <see langword="false" /> if it is not.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlParameter.SourceColumnNullMapping%2A> is used by the <xref:Microsoft.Data.SqlClient.SqlCommandBuilder> to correctly generate update commands when dealing with nullable columns. Generally, use of <xref:Microsoft.Data.SqlClient.SqlParameter.SourceColumnNullMapping%2A> is limited to developers inheriting from <xref:Microsoft.Data.SqlClient.SqlCommandBuilder>.
-
- <xref:System.Data.Common.DbCommandBuilder> uses this property to determine whether the source column is nullable, and sets this property to `true` if it is nullable, and `false` if it is not. When <xref:Microsoft.Data.SqlClient.SqlCommandBuilder> is generating its Update statement, it examines the <xref:Microsoft.Data.SqlClient.SqlParameter.SourceColumnNullMapping%2A> for each parameter. If the property is `true`, <xref:Microsoft.Data.SqlClient.SqlCommandBuilder> generates a WHERE clauses like the following (in this query expression, "FieldName" represents the name of the field):
-
- ```
- ((@IsNull_FieldName = 1 AND FieldName IS NULL) OR
- (FieldName = @Original_FieldName))
- ```
-
- If <xref:Microsoft.Data.SqlClient.SqlParameter.SourceColumnNullMapping%2A> for the field is false, <xref:Microsoft.Data.SqlClient.SqlCommandBuilder> generates the following WHERE clause:
-
- ```
- FieldName = @OriginalFieldName
- ```
-
- In addition, @IsNull_FieldName contains 1 if the source field contains null, and 0 if it does not. This mechanism allows for a performance optimization in SQL Server, and provides for common code that works across multiple providers.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.SourceVersion">
- <summary>Gets or sets the <see cref="T:System.Data.DataRowVersion" /> to use when you load <see cref="P:Microsoft.Data.SqlClient.SqlParameter.Value" /></summary><value>One of the <see cref="T:System.Data.DataRowVersion" /> values. The default is <see langword="Current" />.</value><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.SqlDbType">
- <summary>Gets or sets the <see cref="T:System.Data.SqlDbType" /> of the parameter.</summary><value>One of the <see cref="T:System.Data.SqlDbType" /> values. The default is <see langword="NVarChar" />.</value><remarks>
- <format type="text/markdown"><.
-
- For information about streaming, see [SqlClient Streaming Support](~/docs/framework/data/adonet/sqlclient-streaming-support.md).
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.SqlValue">
- <summary>Gets or sets the value of the parameter as an SQL type.</summary><value>An <see cref="T:System.Object" /> that is the value of the parameter, using SQL types. The default value is null.</value><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.TypeName">
- <summary>Gets or sets the type name for a table-valued parameter.</summary><value>The type name of the specified table-valued parameter.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.UdtTypeName">
- <summary>Gets or sets a <see langword="string" /> that represents a user-defined type as a parameter.</summary><value>A <see langword="string" /> that represents the fully qualified name of a user-defined type in the database.</value><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.Value">
- <summary>Gets or sets the value of the parameter.</summary><value>An <see cref="T:System.Object" /> that is the value of the parameter. The default value is null.</value><remarks>
- <format type="text/markdown"><.
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlParameter> and sets some of its properties.
-
- [!code-csharp[SqlParameter#8](~/../sqlclient/doc/samples/SqlParameter.cs#8)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionDatabase">
- <summary>Gets the name of the database where the schema collection for this XML instance is located.</summary><value>The name of the database where the schema collection for this XML instance is located.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This value is null (`Nothing` in Microsoft Visual Basic) if the collection is defined within the current database. It is also null if there is no schema collection, in which case <xref:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionName%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionOwningSchema%2A> are also null.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionName">
- <summary>Gets the name of the schema collection for this XML instance.</summary><value>The name of the schema collection for this XML instance.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This value is null (`Nothing` in Microsoft Visual Basic) if there is no associated schema collection. If the value is null, then <xref:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionDatabase%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionOwningSchema%2A> are also null.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionOwningSchema">
- <summary>The owning relational schema where the schema collection for this XML instance is located.</summary><value>The owning relational schema for this XML instance.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This value is null (`Nothing` in Microsoft Visual Basic) if the collection is defined within the current database. It is also null if there is no schema collection, in which case <xref:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionDatabase%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.XmlSchemaCollectionName%2A> are also null.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.ResetDbType">
- <summary>Resets the type associated with this <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- When executing a command that includes parameter values, code can either set the type of a parameter explicitly, or the parameter can infer its type from its value. Calling this method resets the parameter so that it can again infer its type from the value passed in the parameter. Calling this method affects both the <xref:Microsoft.Data.SqlClient.SqlParameter.DbType%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.SqlDbType%2A> properties of the <xref:Microsoft.Data.SqlClient.SqlParameter>.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.ResetSqlDbType">
- <summary>Resets the type associated with this <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- When executing a command that includes parameter values, code can either set the type of a parameter explicitly, or the parameter can infer its type from its value. Calling this method resets the parameter so that it can again infer its type from the value passed in the parameter. Calling this method affects both the <xref:Microsoft.Data.SqlClient.SqlParameter.DbType%2A> and <xref:Microsoft.Data.SqlClient.SqlParameter.SqlDbType%2A> properties of the <xref:Microsoft.Data.SqlClient.SqlParameter>.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameter.ToString">
- <summary>Gets a string that contains the <see cref="P:Microsoft.Data.SqlClient.SqlParameter.ParameterName" />.</summary><returns>A string that contains the <see cref="P:Microsoft.Data.SqlClient.SqlParameter.ParameterName" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlParameterCollection">
- <summary>Represents a collection of parameters associated with a <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> and their respective mappings to columns in a <see cref="T:System.Data.DataSet" />. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><.
- ## Examples
- The following example creates multiple instances of <xref:Microsoft.Data.SqlClient.SqlParameter> through the <xref:Microsoft.Data.SqlClient.SqlParameterCollection> collection. The parameters are used to select data within the data source and populate the <xref:System.Data.DataSet>. This code assumes that a <xref:System.Data.DataSet> and a <xref:Microsoft.Data.SqlClient.SqlDataAdapter> have already been created with the appropriate schema, commands, and connection.
- [!code-csharp[SqlParameterCollection_Add6 Example#1](~/../sqlclient/doc/samples/SqlParameterCollection_Add6.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameterCollection.Count">
- <summary>Returns an Integer that contains the number of elements in the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />. Read-only.</summary><value>The number of elements in the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> as an Integer.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameterCollection.IsFixedSize">
- <summary>Gets a value that indicates whether the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> has a fixed size.</summary><value>
- <see langword="true" /> if the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> has a fixed size; otherwise, <see langword="false" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameterCollection.IsReadOnly">
- <summary>Gets a value that indicates whether the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> is read-only.</summary><value>
- <see langword="true" /> if the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> is read-only; otherwise, <see langword="false" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameterCollection.Item(System.Int32)">
- <param name="index">The zero-based index of the parameter to retrieve.</param><summary>Gets the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> at the specified index.</summary><value>The <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> at the specified index.</value><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">The specified index does not exist.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameterCollection.Item(System.String)">
- <param name="parameterName">The name of the parameter to retrieve.</param><summary>Gets the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> with the specified name.</summary><value>The <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> with the specified name.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The `parameterName` is used to look up the index value in the underlying <xref:Microsoft.Data.SqlClient.SqlParameterCollection>. If the `parameterName` is not valid, an <xref:System.IndexOutOfRangeException> will be thrown.
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">The specified <paramref name="parameterName" /> is not valid.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlParameterCollection.SyncRoot">
- <summary>Gets an object that can be used to synchronize access to the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><value>An object that can be used to synchronize access to the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Add(Microsoft.Data.SqlClient.SqlParameter)">
- <param name="value">The <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> to add to the collection.</param><summary>Adds the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object to the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><returns>A new <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object.</returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.ArgumentException">The <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> specified in the <paramref name="value" /> parameter is already added to this or another <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</exception><exception cref="T:System.InvalidCastException">The parameter passed was not a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</exception><exception cref="T:System.ArgumentNullException">The <paramref name="value" /> parameter is null.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Add(System.Object)">
- <param name="value">An <see cref="T:System.Object" />.</param><summary>Adds the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object to the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><returns>The index of the new <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Add(System.String,System.Data.SqlDbType)">
- <param name="parameterName">The name of the parameter.</param><param name="sqlDbType">One of the <see cref="T:System.Data.SqlDbType" /> values.</param><summary>Adds a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> to the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> given the parameter name and the data type.</summary><returns>A new <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object.</returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Add(System.String,System.Data.SqlDbType,System.Int32)">
- <param name="parameterName">The name of the parameter.</param><param name="sqlDbType">The <see cref="T:System.Data.SqlDbType" /> of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> to add to the collection.</param><param name="size">The size as an <see cref="T:System.Int32" />.</param><summary>Adds a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> to the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />, given the specified parameter name, <see cref="T:System.Data.SqlDbType" /> and size.</summary><returns>A new <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object.</returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Add(System.String,System.Data.SqlDbType,System.Int32,System.String)">
- <param name="parameterName">The name of the parameter.</param><param name="sqlDbType">One of the <see cref="T:System.Data.SqlDbType" /> values.</param><param name="size">The column length.</param><param name="sourceColumn">The name of the source column (<see cref="P:Microsoft.Data.SqlClient.SqlParameter.SourceColumn" />) if this <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> is used in a call to <see cref="o:System.Data.Common.DbDataAdapter.Update" />.</param><summary>Adds a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> to the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> with the parameter name, the data type, and the column length.</summary><returns>A new <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object.</returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.AddRange(Microsoft.Data.SqlClient.SqlParameter[])">
- <param name="values">The <see cref="T:System.Array" /> values to add.</param><summary>Adds an array of values to the end of the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.AddRange(System.Array)">
- <param name="values">The <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> values to add.</param><summary>Adds an array of <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> values to the end of the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.AddWithValue(System.String,System.Object)">
- <param name="parameterName">The name of the parameter.</param><param name="value">The value to be added. Use <see cref="F:System.DBNull.Value" /> instead of null, to indicate a null value.</param><summary>Adds a value to the end of the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><returns>A <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object.</returns><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Clear">
- <summary>Removes all the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> objects from the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Contains(Microsoft.Data.SqlClient.SqlParameter)">
- <param name="value">The <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> value.</param><summary>Determines whether the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> is in this <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><returns>
- <see langword="true" /> if the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> contains the value; otherwise, <see langword="false" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Contains(System.Object)">
- <param name="value">The <see cref="T:System.Object" /> value.</param><summary>Determines whether the specified <see cref="T:System.Object" /> is in this <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><returns>
- <see langword="true" /> if the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> contains the value; otherwise, <see langword="false" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Contains(System.String)">
- <param name="value">The <see cref="T:System.String" /> value.</param><summary>Determines whether the specified parameter name is in this <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><returns>
- <see langword="true" /> if the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> contains the value; otherwise, <see langword="false" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.CopyTo(System.Array,System.Int32)">
- <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from the current <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</param><param name="index">A 32-bit integer that represents the index in the <see cref="T:System.Array" /> at which copying starts.</param><summary>Copies all the elements of the current <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> to the specified one-dimensional <see cref="T:System.Array" /> starting at the specified destination <see cref="T:System.Array" /> index.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.CopyTo(Microsoft.Data.SqlClient.SqlParameter[],System.Int32)">
- <param name="array">The <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> that is the destination of the elements copied from the current <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</param><param name="index">A 32-bit integer that represents the index in the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> at which copying starts.</param><summary>Copies all the elements of the current <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> to the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> starting at the specified destination index.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.GetEnumerator">
- <summary>Returns an enumerator that iterates through the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</summary><returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.GetParameter(System.Int32)">
- <param name="index">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.GetParameter(System.String)">
- <param name="parameterName">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.IndexOf(Microsoft.Data.SqlClient.SqlParameter)">
- <param name="value">The <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> to find.</param><summary>Gets the location of the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> within the collection.</summary><returns>The zero-based location of the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> that is a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> within the collection. Returns -1 when the object does not exist in the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.IndexOf(System.Object)">
- <param name="value">The <see cref="T:System.Object" /> to find.</param><summary>Gets the location of the specified <see cref="T:System.Object" /> within the collection.</summary><returns>The zero-based location of the specified <see cref="T:System.Object" /> that is a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> within the collection. Returns -1 when the object does not exist in the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.IndexOf(System.String)">
- <param name="parameterName">The case-sensitive name of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> to find.</param><summary>Gets the location of the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> with the specified name.</summary><returns>The zero-based location of the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> with the specified case-sensitive name. Returns -1 when the object does not exist in the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Insert(System.Int32,Microsoft.Data.SqlClient.SqlParameter)">
- <param name="index">The zero-based index at which value should be inserted.</param><param name="value">A <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object to be inserted in the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</param><summary>Inserts a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object into the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> at the specified index.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Insert(System.Int32,System.Object)">
- <param name="index">The zero-based index at which value should be inserted.</param><param name="value">An <see cref="T:System.Object" /> to be inserted in the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" />.</param><summary>Inserts an <see cref="T:System.Object" /> into the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> at the specified index.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Remove(Microsoft.Data.SqlClient.SqlParameter)">
- <param name="value">A <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object to remove from the collection.</param><summary>Removes the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> from the collection.</summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.InvalidCastException">The parameter is not a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />.</exception><exception cref="T:System.SystemException">The parameter does not exist in the collection.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.Remove(System.Object)">
- <param name="value">The object to remove from the collection.</param><summary>Removes the specified <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> from the collection.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.RemoveAt(System.Int32)">
- <param name="index">The zero-based index of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> object to remove.</param><summary>Removes the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> from the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> at the specified index.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.RemoveAt(System.String)">
- <param name="parameterName">The name of the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> to remove.</param><summary>Removes the <see cref="T:Microsoft.Data.SqlClient.SqlParameter" /> from the <see cref="T:Microsoft.Data.SqlClient.SqlParameterCollection" /> at the specified parameter name.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.SetParameter(System.Int32,System.Data.Common.DbParameter)">
- <param name="index">To be added.</param><param name="value">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlParameterCollection.SetParameter(System.String,System.Data.Common.DbParameter)">
- <param name="parameterName">To be added.</param><param name="value">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs">
- <summary>Represents the set of arguments passed to the <see cref="T:Microsoft.Data.SqlClient.SqlRowsCopiedEventHandler" />.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs.#ctor(System.Int64)">
- <param name="rowsCopied">An <see cref="T:System.Int64" /> that indicates the number of rows copied during the current bulk copy operation.</param><summary>Creates a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs" /> object.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The value in the `rowsCopied` parameter is reset on each call to any one of the `SqlBulkCopy.WriteToServer` methods.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs.Abort">
- <summary>Gets or sets a value that indicates whether the bulk copy operation should be aborted.</summary><value>
- <see langword="true" /> if the bulk copy operation should be aborted; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Use the <xref:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs.Abort%2A> property to cancel a bulk copy operation. Set <xref:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs.Abort%2A> to `true` to abort the bulk copy operation.
-
- If you call the **Close** method from <xref:Microsoft.Data.SqlClient.SqlBulkCopy.SqlRowsCopied>, an exception is generated, and the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> object state does not change.
-
- If an application specifically creates a <xref:Microsoft.Data.SqlClient.SqlTransaction> object in the <xref:Microsoft.Data.SqlClient.SqlCommand> constructor, the transaction is not rolled back. The application is responsible for determining whether it is required to rollback the operation, and if so, it must call the <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A?displayProperty=nameWithType> method. If the application does not create a transaction, the internal transaction corresponding to the current batch is automatically rolled back. However, changes related to previous batches within the bulk copy operation are retained, because the transactions for them already have been committed.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs.RowsCopied">
- <summary>Gets a value that returns the number of rows copied during the current bulk copy operation.</summary><value>
- <see langword="int" /> that returns the number of rows copied.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The value in the <xref:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs.RowsCopied%2A> property is reset on each call to any of the `SqlBulkCopy.WriteToServer` methods.
-
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlRowsCopiedEventHandler">
- <param name="sender">The source of the event.</param><param name="e">A <see cref="T:Microsoft.Data.SqlClient.SqlRowsCopiedEventArgs" /> object that contains the event data.</param><summary>Represents the method that handles the <see cref="E:Microsoft.Data.SqlClient.SqlBulkCopy.SqlRowsCopied" /> event of a <see cref="T:Microsoft.Data.SqlClient.SqlBulkCopy" />.</summary><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlRowUpdatedEventArgs">
- <summary>Provides data for the <see cref="E:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated" /> event.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> event is raised when an <xref:System.Data.Common.DbDataAdapter.Update%2A> to a row is completed.
-
- When using <xref:System.Data.Common.DbDataAdapter.Update%2A>, there are two events that occur for each data row updated. The order of execution is as follows:
-
- 1. The values in the <xref:System.Data.DataRow> are moved to the parameter values.
-
- 2. The <xref:System.Data.Common.DbDataAdapter.OnRowUpdating%2A> event is raised.
-
- 3. The command executes.
-
- 4. If the command is set to `FirstReturnedRecord`, and the first returned result is placed in the <xref:System.Data.DataRow>.
-
- 5. If there are output parameters, they are placed in the <xref:System.Data.DataRow>.
-
- 6. The <xref:System.Data.Common.DbDataAdapter.OnRowUpdated%2A> event is raised.
-
- 7. <xref:System.Data.DataRow.AcceptChanges%2A> is called.
-
-
-
- ## Examples
- The following example shows how to use both the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> and <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> events.
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> event returns this output:
-
- Event Arguments: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 status=0)
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> event returns this output:
-
- Event Arguments: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 recordsAffected=1 row=System.Data.DataRow[37] status=0)
-
- [!code-csharp[SqlDataAdapter_RowUpdated Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_RowUpdated.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlRowUpdatedEventArgs.#ctor(System.Data.DataRow,System.Data.IDbCommand,System.Data.StatementType,System.Data.Common.DataTableMapping)">
- <param name="row">The <see cref="T:System.Data.DataRow" /> sent through an <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />.</param><param name="command">The <see cref="T:System.Data.IDbCommand" /> executed when <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> is called.</param><param name="statementType">One of the <see cref="T:System.Data.StatementType" /> values that specifies the type of query executed.</param><param name="tableMapping">The <see cref="T:System.Data.Common.DataTableMapping" /> sent through an <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlRowUpdatedEventArgs" /> class.</summary><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlRowUpdatedEventArgs.Command">
- <summary>Gets or sets the <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> executed when <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> is called.</summary><value>The <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> executed when <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> is called.</value><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlRowUpdatedEventHandler">
- <param name="sender">The source of the event.</param><param name="e">The <see cref="T:Microsoft.Data.SqlClient.SqlRowUpdatedEventArgs" /> that contains the event data.</param><summary>Represents the method that will handle the <see cref="E:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated" /> event of a <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" />.</summary><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlRowUpdatingEventArgs">
- <summary>Provides data for the <see cref="E:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating" /> event.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> event is raised before an <xref:System.Data.Common.DbDataAdapter.Update%2A> to a row.
-
- When you are using <xref:System.Data.Common.DbDataAdapter.Update%2A>, there are two events that occur for each data row updated. The order of execution is as follows:
-
- 1. The values in the <xref:System.Data.DataRow> are moved to the parameter values.
-
- 2. The <xref:System.Data.Common.DbDataAdapter.OnRowUpdating%2A> event is raised.
-
- 3. The command executes.
-
- 4. If the command is set to `FirstReturnedRecord`, and the first returned result is placed in the <xref:System.Data.DataRow>.
-
- 5. If there are output parameters, they are placed in the <xref:System.Data.DataRow>.
-
- 6. The <xref:System.Data.Common.DbDataAdapter.OnRowUpdated%2A> event is raised.
-
- 7. <xref:System.Data.DataRow.AcceptChanges%2A> is called.
-
-
-
- ## Examples
- The following example shows how to use both the <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> and <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> events.
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating> event returns this output:
-
- event args: (command=Microsoft.Data.SqlClient.SQLCommand commandType=2 status=0)
-
- The <xref:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdated> event returns this output:
-
- event args: (command=Microsoft.Data.SqlClient.SQLCommand commandType=2 recordsAffected=1 row=System.Data.DataRow[37] status=0)
-
- [!code-csharp[SqlRowUpdatingEventArgs Example#1](~/../sqlclient/doc/samples/SqlRowUpdatingEventArgs.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlRowUpdatingEventArgs.#ctor(System.Data.DataRow,System.Data.IDbCommand,System.Data.StatementType,System.Data.Common.DataTableMapping)">
- <param name="row">The <see cref="T:System.Data.DataRow" /> to <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />.</param><param name="command">The <see cref="T:System.Data.IDbCommand" /> to execute during <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />.</param><param name="statementType">One of the <see cref="T:System.Data.StatementType" /> values that specifies the type of query executed.</param><param name="tableMapping">The <see cref="T:System.Data.Common.DataTableMapping" /> sent through an <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlRowUpdatingEventArgs" /> class.</summary><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlRowUpdatingEventArgs.BaseCommand">
- <summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlRowUpdatingEventArgs.Command">
- <summary>Gets or sets the <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> to execute when performing the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />.</summary><value>The <see cref="T:Microsoft.Data.SqlClient.SqlCommand" /> to execute when performing the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlRowUpdatingEventHandler">
- <param name="sender">The source of the event.</param><param name="e">The <see cref="T:Microsoft.Data.SqlClient.SqlRowUpdatingEventArgs" /> that contains the event data.</param><summary>Represents the method that will handle the <see cref="E:Microsoft.Data.SqlClient.SqlDataAdapter.RowUpdating" /> event of a <see cref="T:Microsoft.Data.SqlClient.SqlDataAdapter" />.</summary><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.SqlTransaction">
- <summary>Represents a Transact-SQL transaction to be made in a SQL Server database. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The application creates a <xref:Microsoft.Data.SqlClient.SqlTransaction> object by calling <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A> on the <xref:Microsoft.Data.SqlClient.SqlConnection> object. All subsequent operations associated with the transaction (for example, committing or aborting the transaction), are performed on the <xref:Microsoft.Data.SqlClient.SqlTransaction> object.
-
- > [!NOTE]
- > `Try`/`Catch` exception handling should always be used when committing or rolling back a <xref:Microsoft.Data.SqlClient.SqlTransaction>. Both <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A> and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> generate an <xref:System.InvalidOperationException> if the connection is terminated or if the transaction has already been rolled back on the server.
-
- For more information on SQL Server transactions, see [Explicit Transactions](https://msdn.microsoft.com/library/ms175127\(SQL.105\).aspx) and [Coding Efficient Transactions](https://msdn.microsoft.com/library/ms187484\(SQL.105\).aspx).
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlTransaction>. It also demonstrates how to use the <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>, <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A>, and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> methods. The transaction is rolled back on any error, or if it is disposed without first being committed. `Try`/`Catch` error handling is used to handle any errors when attempting to commit or roll back the transaction.
-
- [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlTransaction.Connection">
- <summary>Gets the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> object associated with the transaction, or <see langword="null" /> if the transaction is no longer valid.</summary><value>The <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> object associated with the transaction.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- A single application may have multiple database connections, each with zero or more transactions. This property lets you determine the connection object associated with a particular transaction created by <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>.
-
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlTransaction.DbConnection">
- <summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.SqlTransaction.IsolationLevel">
- <summary>Specifies the <see cref="T:System.Data.IsolationLevel" /> for this transaction.</summary><value>The <see cref="T:System.Data.IsolationLevel" /> for this transaction. The default is <see langword="ReadCommitted" />.</value><remarks>
- <format type="text/markdown"><.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlTransaction.Commit">
- <summary>Commits the database transaction.</summary><remarks>
- <format type="text/markdown"><.
-
- > [!NOTE]
- > `Try`/`Catch` exception handling should always be used when committing or rolling back a <xref:Microsoft.Data.SqlClient.SqlTransaction>. Both `Commit` and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> generates an <xref:System.InvalidOperationException> if the connection is terminated or if the transaction has already been rolled back on the server.
-
- For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql).
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlTransaction>. It also demonstrates how to use the <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A>, <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>, and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> methods. The transaction is rolled back on any error. `Try`/`Catch` error handling is used to handle any errors when attempting to commit or roll back the transaction.
-
- [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:System.Exception">An error occurred while trying to commit the transaction.</exception><exception cref="T:System.InvalidOperationException">The transaction has already been committed or rolled back.
-
- -or-
-
- The connection is broken.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlTransaction.Dispose(System.Boolean)">
- <param name="disposing"><see langword="true" /> to release managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param><summary>Releases the unmanaged resources used and optionally releases the managed resources.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This method calls <xref:System.Data.Common.DbTransaction.Dispose%2A>.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlTransaction.Rollback">
- <summary>Rolls back a transaction from a pending state.</summary>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlTransaction.Rollback(System.String)">
- <summary>Rolls back a transaction from a pending state.</summary><remarks>
- <format type="text/markdown"><.
-
- The transaction can only be rolled back from a pending state (after <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A> has been called, but before <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A> is called). The transaction is rolled back in the event it is disposed before `Commit` or `Rollback` is called.
-
- > [!NOTE]
- > `Try`/`Catch` exception handling should always be used when rolling back a transaction. A `Rollback` generates an <xref:System.InvalidOperationException> if the connection is terminated or if the transaction has already been rolled back on the server.
-
- For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql).
-
-
-
- ## Examples
- The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlTransaction>. It also demonstrates how to use the <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A>, <xref:Microsoft.Data.SqlClient.SqlTransaction.Commit%2A>, and <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> methods. The transaction is rolled back on any error. `Try`/`Catch` error handling is used to handle any errors when attempting to commit or roll back the transaction.
-
- [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)]
-
- ]]></format>
- </remarks><exception cref="T:System.Exception">An error occurred while trying to commit the transaction.</exception><exception cref="T:System.InvalidOperationException">The transaction has already been committed or rolled back.
-
- -or-
-
- The connection is broken.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.SqlTransaction.Save(System.String)">
- <param name="savePointName">The name of the savepoint.</param><summary>Creates a savepoint in the transaction that can be used to roll back a part of the transaction, and specifies the savepoint name.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- <xref:Microsoft.Data.SqlClient.SqlTransaction.Save%2A> method is equivalent to the Transact-SQL SAVE TRANSACTION statement.
-
- The value used in the `savePoint` parameter can be the same value used in the `transactionName` parameter of some implementations of the <xref:Microsoft.Data.SqlClient.SqlConnection.BeginTransaction%2A> method.
-
- Savepoints offer a mechanism to roll back parts of transactions. You create a savepoint using the <xref:Microsoft.Data.SqlClient.SqlTransaction.Save%2A> method, and then later call the <xref:Microsoft.Data.SqlClient.SqlTransaction.Rollback%2A> method to roll back to the savepoint instead of rolling back to the start of the transaction.
-
- ]]></format>
- </remarks><exception cref="T:System.Exception">An error occurred while trying to commit the transaction.</exception><exception cref="T:System.InvalidOperationException">The transaction has already been committed or rolled back.
-
- -or-
-
- The connection is broken.</exception>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.DataAccessKind">
- <summary>Describes the type of access to user data for a user-defined method or function.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Describes the type of access to user data for a user-defined method or function.
-
- This enumeration is used in <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> and <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute> to indicate whether the method or function uses ADO.NET to connect back to the database using the "context connection."
-
- Note that methods and functions are not allowed to make changes to the database, so the options for this enumeration are `None` (meaning no data-access performed by the method or function) and `Read` (meaning that the method or function perform read-only data-access operations, such as executing SELECT statements).
-
- ]]></format>
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.Server.DataAccessKind.None">
- <summary>The method or function does not access user data.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.Server.DataAccessKind.Read">
- <summary>The method or function reads user data.</summary>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.Format">
- <summary>Used by <see cref="T:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute" /> and <see cref="T:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute" /> to indicate the serialization format of a user-defined type (UDT) or aggregate.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This enumeration is used by <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute> and <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute> to indicate the serialization format of a user-defined type (UDT) or aggregate. Use of the `Native` and `UserDefined` enumeration members has special requirements.
- - `Format.Native`
- The requirements for the `Format.Native` format are:
-
- - The <xref:System.Runtime.InteropServices.StructLayoutAttribute> with a <xref:System.Runtime.InteropServices.StructLayoutAttribute.Value> property value of <xref:System.Runtime.InteropServices.LayoutKind.Sequential?displayProperty=nameWithType> must be applied to the aggregate or UDT if it is defined in a class and not a structure. This controls the physical layout of the data fields and is used to force the members to be laid out sequentially in the order they appear. SQL Server uses this attribute to determine the field order for UDTs with multiple fields.
-
- - The type must contain at least one member (serialized values cannot be zero bytes in size).
-
- - All the fields of the aggregate must be *blittable*; that is, they must have a common representation in both managed and unmanaged memory and not require special handling by the interop marshaler.
-
- - All the fields of the UDT should be of one of the following types that can be serialized: `bool`, `byte`, `sbyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `float`, `double`, <xref:System.Data.SqlTypes.SqlByte>, <xref:System.Data.SqlTypes.SqlInt16>, <xref:System.Data.SqlTypes.SqlInt32>, <xref:System.Data.SqlTypes.SqlInt64>, <xref:System.Data.SqlTypes.SqlDateTime>, <xref:System.Data.SqlTypes.SqlSingle>, <xref:System.Data.SqlTypes.SqlDouble>, <xref:System.Data.SqlTypes.SqlMoney>, or other value types defined by the user that contain fields of one of these types.
- - The aggregate must not specify a value for `MaxByteSize`.
-
- - The aggregate must not have any [NonSerialized] fields.
-
- - Fields must not be marked as an explicit layout (with a <xref:System.Runtime.InteropServices.StructLayoutAttribute.Value?displayProperty=nameWithType> of <xref:System.Runtime.InteropServices.LayoutKind.Explicit?displayProperty=nameWithType>).
- - `Format.UserDefined`
- The requirements for the `Format.UserDefined` format are:
- - The aggregate must specify a value for `MaxByteSize`.
-
- - Specify the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A?displayProperty=nameWithType> attribute property. The default value is `false`.
-
- - If you omit any field in the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read%2A?displayProperty=nameWithType> or <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Write%2A?displayProperty=nameWithType> methods, the state of that field is not serialized.
- ## Examples
- The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format.
-
- [!code-csharp[SqlUserDefinedType Example#1](~/../sqlclient/doc/samples/SqlUserDefinedType.cs#1)]
-
- ]]></format>
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.Server.Format.Unknown">
- <summary>The serialization format is unknown.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.Server.Format.Native">
- <summary>This serialization format uses a very simple algorithm that enables SQL Server to store an efficient representation of the UDT on disk. Types marked for <see langword="Native" /> serialization can only have value types (structs in Microsoft Visual C# and structures in Microsoft Visual Basic .NET) as members. Members of reference types (such as classes in Visual C# and Visual Basic), either user-defined or those existing in .NET class libraries (such as <see cref="T:System.String" />), are not supported.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.Server.Format.UserDefined">
- <summary>This serialization format gives the developer full control over the binary format through the <see cref="M:Microsoft.Data.SqlClient.Server.IBinarySerialize.Write(System.IO.BinaryWriter)" /> and <see cref="M:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read(System.IO.BinaryReader)" /> methods.</summary>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.IBinarySerialize">
- <summary>Provides custom implementation for user-defined type (UDT) and user-defined aggregate serialization and deserialization.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- User-defined types (UDTs) and user-defined aggregates are required to define a storage format, which can be either <xref:Microsoft.Data.SqlClient.Server.Format>.`Native` or <xref:Microsoft.Data.SqlClient.Server.Format>.`UserDefined`.
-
- <xref:Microsoft.Data.SqlClient.Server.Format>.`Native` allows SQL Server to handle serialization and deserialization automatically, but the format has restrictions on the kind of types it can handle. <xref:Microsoft.Data.SqlClient.Server.Format>.`UserDefined` allows user-defined types and aggregates to handle their own serialization. User-defined types and aggregates must be marked with <xref:Microsoft.Data.SqlClient.Server.Format>.`UserDefined` in the `SqlUserDefinedType` or `SqlUserDefinedAggregate` attribute, and must implement the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize> interface.
-
- Note that even with custom serialization, the total size of each instance must be under the maximum allowed limit, currently 8000 bytes.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read(System.IO.BinaryReader)">
- <param name="r">The <see cref="T:System.IO.BinaryReader" /> stream from which the object is deserialized.</param><summary>Generates a user-defined type (UDT) or user-defined aggregate from its binary form.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.IBinarySerialize.Write(System.IO.BinaryWriter)">
- <param name="w">The <see cref="T:System.IO.BinaryWriter" /> stream to which the UDT or user-defined aggregate is serialized.</param><summary>Converts a user-defined type (UDT) or user-defined aggregate into its binary format so that it may be persisted.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.InvalidUdtException">
- <summary>Thrown when SQL Server or the ADO.NET <see cref="N:Microsoft.Data.SqlClient" /> provider detects an invalid user-defined type (UDT).</summary><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.SqlDataRecord">
- <summary>Represents a single row of data and its metadata. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.#ctor(Microsoft.Data.SqlClient.Server.SqlMetaData[])">
- <param name="metaData">An array of <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> objects that describe each column in the <see cref="T:Microsoft.Data.SqlClient.Server.SqlDataRecord" />.</param><summary>Inititializes a new <see cref="T:Microsoft.Data.SqlClient.Server.SqlDataRecord" /> instance with the schema based on the array of <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> objects passed as an argument.</summary><remarks>
- <format type="text/markdown"><]
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="metaData" /> is <see langword="null" />.</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount">
- <summary>Gets the number of columns in the data row. This property is read-only.</summary><value>The number of columns in the data row as an integer.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.Item(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the common language runtime (CLR) type value for the column specified by the column <paramref name="ordinal" /> argument.</summary><value>The CLR type value of the column specified by the <paramref name="ordinal" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- For columns with null value, <xref:System.DBNull.Value> is returned.
-
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.Item(System.String)">
- <param name="name">The name of the column.</param><summary>Gets the common language runtime (CLR) type value for the column specified by the column <paramref name="name" /> argument.</summary><value>The CLR type value of the column specified by the <paramref name="name" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- For columns with null value, <xref:System.DBNull.Value> is returned.
-
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetBoolean(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Boolean" />.</summary><returns>The column value as a <see cref="T:System.Boolean" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetByte(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Byte" />.</summary><returns>The column value as a <see cref="T:System.Byte" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetBytes(System.Int32,System.Int64,System.Byte[],System.Int32,System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="fieldOffset">The offset into the field value to start retrieving bytes.</param><param name="buffer">The target buffer to which to copy bytes.</param><param name="bufferOffset">The offset into the buffer to which to start copying bytes.</param><param name="length">The number of bytes to copy to the buffer.</param><summary>Gets the value for the column specified by the ordinal as an array of <see cref="T:System.Byte" /> objects.</summary><returns>The number of bytes copied.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This method enables you to obtain a binary value either in a single call or in chunks. Getting the value in chunks is useful for large values or values of unknown size.
-
- To obtain the value in several chunks, allocate a byte array of the chunk-size and call <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetBytes%2A> repeatedly, adjusting the `fieldOffset` parameter accordingly in each call.
-
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetChar(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Char" />.</summary><returns>The column value as a <see cref="T:System.Char" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetChars(System.Int32,System.Int64,System.Char[],System.Int32,System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="fieldOffset">The offset into the field value to start retrieving characters.</param><param name="buffer">The target buffer to copy chars to.</param><param name="bufferOffset">The offset into the buffer to start copying chars to.</param><param name="length">The number of chars to copy to the buffer.</param><summary>Gets the value for the column specified by the ordinal as an array of <see cref="T:System.Char" /> objects.</summary><returns>The number of characters copied.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This method enables you to obtain a character value either in a single call or in chunks. Getting the value in chunks is useful for large values or values of unknown size.
-
- To obtain the value in several chunks, allocate a char array of the chunk-size and call <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetChars%2A> repeatedly adjusting the `fieldOffset` parameter accordingly in each call.
-
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.System#Data#IDataRecord#GetData(System.Int32)">
- <param name="ordinal">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetDataTypeName(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Returns the name of the data type for the column specified by the ordinal argument.</summary><returns>A <see cref="T:System.String" /> that contains the data type of the column.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This method returns the type name as known in the SQL Server type-system. For user-defined types (UDTs), it returns the three-part name that was used to register the type with SQL Server.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetDateTime(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.DateTime" />.</summary><returns>The column value as a <see cref="T:System.DateTime" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetDateTimeOffset(System.Int32)">
- <param name="ordinal">The zero-based column ordinal.</param><summary>Returns the specified column's data as a <see cref="T:System.DateTimeOffset" />.</summary><returns>The value of the specified column as a <see cref="T:System.DateTimeOffset" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetDecimal(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Decimal" />.</summary><returns>The column value as a <see cref="T:System.Decimal" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetDouble(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Double" />.</summary><returns>The column value as a <see cref="T:System.Double" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetFieldType(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Returns a <see cref="T:System.Type" /> object representing the common language runtime (CLR) type that maps to the SQL Server type of the column specified by the <paramref name="ordinal" /> argument.</summary><returns>The column type as a <see cref="T:System.Type" /> object.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.TypeLoadException">The column is of a user-defined type that is not available to the calling application domain.</exception><exception cref="T:System.IO.FileNotFoundException">The column is of a user-defined type that is not available to the calling application domain.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetFloat(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see langword="float" />.</summary><returns>The column value as a <see langword="float" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetGuid(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Guid" />.</summary><returns>The column value as a <see cref="T:System.Guid" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetInt16(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Int16" />.</summary><returns>The column value as a <see cref="T:System.Int16" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetInt32(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Int32" />.</summary><returns>The column value as a <see cref="T:System.Int32" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetInt64(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Int64" />.</summary><returns>The column value as a <see cref="T:System.Int64" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.Data.SqlTypes.SqlNullValueException">The column specified by <paramref name="ordinal" /> is null.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetName(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Returns the name of the column specified by the ordinal argument.</summary><returns>A <see cref="T:System.String" /> containing the column name.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetOrdinal(System.String)">
- <param name="name">The name of the column to look up.</param><summary>Returns the column ordinal specified by the column name.</summary><returns>The zero-based ordinal of the column as an integer.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="name" /> is <see langword="null" />.</exception><exception cref="T:System.IndexOutOfRangeException">The column name could not be found.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlBinary(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlBinary" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlBinary" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlBoolean(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlBoolean" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlBoolean" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlByte(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlByte" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlByte" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlBytes(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlBytes" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlBytes" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlChars(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlChars" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlChars" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlDateTime(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlDateTime" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlDateTime" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlDecimal(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlDecimal" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlDecimal" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlDouble(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlDouble" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlDouble" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlFieldType(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Returns a <see cref="T:System.Type" /> object that represents the type (as a SQL Server type, defined in <see cref="N:System.Data.SqlTypes" />) that maps to the SQL Server type of the column.</summary><returns>The column type as a <see cref="T:System.Type" /> object.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.TypeLoadException">The column is of a user-defined type that is not available to the calling application domain.</exception><exception cref="T:System.IO.FileNotFoundException">The column is of a user-defined type that is not available to the calling application domain.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlGuid(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlGuid" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlGuid" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlInt16(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlInt16" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlInt16" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlInt32(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlInt32" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlInt32" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlInt64(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlInt64" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlInt64" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlMetaData(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Returns a <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> object, describing the metadata of the column specified by the column ordinal.</summary><returns>The column metadata as a <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> object.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlMoney(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlMoney" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlMoney" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlSingle(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlSingle" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlSingle" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlString(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlString" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlString" />.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlValue(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Returns the data value stored in the column, expressed as a SQL Server type, specified by the column ordinal.</summary><returns>The value of the column, expressed as a SQL Server type, as a <see cref="T:System.Object" />.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- For null values, a SQL Server type instance is returned where the <xref:System.Data.SqlTypes.INullable.IsNull%2A> property is true.
-
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception><altmember cref="N:System.Data.SqlTypes" />
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlValues(System.Object[])">
- <param name="values">The array into which to copy the values column values.</param><summary>Returns the values for all the columns in the record, expressed as SQL Server types, in an array.</summary><returns>An <see cref="T:System.Int32" /> that indicates the number of columns copied.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The SQL Server type values of the column are copied into the `values` array that is passed as a parameter. For null values, a Sql type instance is returned where the <xref:System.Data.SqlTypes.INullable.IsNull%2A> property is true.
-
- The length of the `values` array does not need to match the number of columns in the record. If the array length is greater than the number of columns, all of the column values are copied into the array; if it is less, only the array length number of column values are copied into the array, starting at the column value with ordinal 0.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="values" /> is <see langword="null" />.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception><altmember cref="N:System.Data.SqlTypes" />
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetSqlXml(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.Data.SqlTypes.SqlXml" />.</summary><returns>The column value as a <see cref="T:System.Data.SqlTypes.SqlXml" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetString(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Gets the value for the column specified by the ordinal as a <see cref="T:System.String" />.</summary><returns>The column value as a <see cref="T:System.String" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetTimeSpan(System.Int32)">
- <param name="ordinal">The zero-based column ordinal.</param><summary>Returns the specified column's data as a <see cref="T:System.TimeSpan" />.</summary><returns>The value of the specified column as a <see cref="T:System.TimeSpan" />.</returns><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetValue(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Returns the common language runtime (CLR) type value for the column specified by the ordinal argument.</summary><returns>The CLR type value of the column specified by the ordinal.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- For columns with null value, <xref:System.DBNull.Value> is returned.
-
- ]]></format>
- </remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.GetValues(System.Object[])">
- <param name="values">The array into which to copy the values column values.</param><summary>Returns the values for all the columns in the record, expressed as common language runtime (CLR) types, in an array.</summary><returns>An <see cref="T:System.Int32" /> that indicates the number of columns copied.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The CLR type values of the column are copied into the `values` array that is passed as a parameter. For columns with null value, <xref:System.DBNull.Value> is returned.
-
- The length of the `values` array does not need to match the number of columns in the record. If the array length is greater than the number of columns, all of the column values are copied into the array; if it is less, only the array length number of column values is copied into the array, starting at the column value with ordinal 0.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="values" /> is <see langword="null" />.</exception><exception cref="T:System.InvalidCastException">There is a type mismatch.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.IsDBNull(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Returns true if the column specified by the column ordinal parameter is null.</summary><returns>
- <see langword="true" /> if the column is null; <see langword="false" /> otherwise.</returns><remarks>To be added.</remarks><exception cref="T:System.IndexOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetBoolean(System.Int32,System.Boolean)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Boolean" /> value.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetByte(System.Int32,System.Byte)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Byte" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetBytes(System.Int32,System.Int64,System.Byte[],System.Int32,System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="fieldOffset">The offset into the field value to start copying bytes.</param><param name="buffer">The target buffer from which to copy bytes.</param><param name="bufferOffset">The offset into the buffer from which to start copying bytes.</param><param name="length">The number of bytes to copy from the buffer.</param><summary>Sets the data stored in the column to the specified array of <see cref="T:System.Byte" /> values.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetChar(System.Int32,System.Char)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Char" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetChars(System.Int32,System.Int64,System.Char[],System.Int32,System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="fieldOffset">The offset into the field value to start copying characters.</param><param name="buffer">The target buffer from which to copy chars.</param><param name="bufferOffset">The offset into the buffer from which to start copying chars.</param><param name="length">The number of chars to copy from the buffer.</param><summary>Sets the data stored in the column to the specified array of <see cref="T:System.Char" /> values.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetDateTime(System.Int32,System.DateTime)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.DateTime" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetDateTimeOffset(System.Int32,System.DateTimeOffset)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the value of the column specified to the <see cref="T:System.DateTimeOffset" /> value.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetDBNull(System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><summary>Sets the value in the specified column to <see cref="T:System.DBNull" />.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetDecimal(System.Int32,System.Decimal)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Decimal" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetDouble(System.Int32,System.Double)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Double" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetFloat(System.Int32,System.Single)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see langword="float" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetGuid(System.Int32,System.Guid)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Guid" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetInt16(System.Int32,System.Int16)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Int16" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetInt32(System.Int32,System.Int32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Int32" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetInt64(System.Int32,System.Int64)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Int64" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlBinary(System.Int32,System.Data.SqlTypes.SqlBinary)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlBinary" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlBoolean(System.Int32,System.Data.SqlTypes.SqlBoolean)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlBoolean" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlByte(System.Int32,System.Data.SqlTypes.SqlByte)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlByte" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlBytes(System.Int32,System.Data.SqlTypes.SqlBytes)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlBytes" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlChars(System.Int32,System.Data.SqlTypes.SqlChars)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlChars" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlDateTime(System.Int32,System.Data.SqlTypes.SqlDateTime)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlDateTime" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlDecimal(System.Int32,System.Data.SqlTypes.SqlDecimal)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlDecimal" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlDouble(System.Int32,System.Data.SqlTypes.SqlDouble)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlDouble" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlGuid(System.Int32,System.Data.SqlTypes.SqlGuid)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlGuid" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlInt16(System.Int32,System.Data.SqlTypes.SqlInt16)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlInt16" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlInt32(System.Int32,System.Data.SqlTypes.SqlInt32)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlInt32" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlInt64(System.Int32,System.Data.SqlTypes.SqlInt64)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlInt64" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlMoney(System.Int32,System.Data.SqlTypes.SqlMoney)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlMoney" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlSingle(System.Int32,System.Data.SqlTypes.SqlSingle)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlSingle" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlString(System.Int32,System.Data.SqlTypes.SqlString)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlString" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetSqlXml(System.Int32,System.Data.SqlTypes.SqlXml)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.Data.SqlTypes.SqlXml" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetString(System.Int32,System.String)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the data stored in the column to the specified <see cref="T:System.String" /> value.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetTimeSpan(System.Int32,System.TimeSpan)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value of the column.</param><summary>Sets the value of the column specified to the <see cref="T:System.TimeSpan" />.</summary><remarks>To be added.</remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> passed in is a negative number.</exception><exception cref="T:System.ArgumentException">The <see cref="T:System.TimeSpan" /> value passed in is greater than 24 hours in length.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetValue(System.Int32,System.Object)">
- <param name="ordinal">The zero-based ordinal of the column.</param><param name="value">The new value for the specified column.</param><summary>Sets a new value, expressed as a common language runtime (CLR) type, for the column specified by the column ordinal.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- `value` is a SQL type boxed as a <xref:System.Object> instance.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="ordinal" /> is less than 0 or greater than the number of columns (that is, <see cref="P:Microsoft.Data.SqlClient.Server.SqlDataRecord.FieldCount" />).</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlDataRecord.SetValues(System.Object[])">
- <param name="values">The array of new values, expressed as CLR types boxed as <see cref="T:System.Object" /> references, for the <see cref="T:Microsoft.Data.SqlClient.Server.SqlDataRecord" /> instance.</param><summary>Sets new values for all of the columns in the <see cref="T:Microsoft.Data.SqlClient.Server.SqlDataRecord" />. These values are expressed as common language runtime (CLR) types.</summary><returns>The number of column values set as an integer.</returns><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The length of values must match the number of columns in the <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord> instance.
-
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">
- <paramref name="values" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException">The size of values does not match the number of columns in the <see cref="T:Microsoft.Data.SqlClient.Server.SqlDataRecord" /> instance.</exception>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute">
- <summary>Used to mark a method definition of a user-defined aggregate as a function in SQL Server. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server.</summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.#ctor">
- <summary>An optional attribute on a user-defined aggregate, used to indicate that the method should be registered in SQL Server as a function. Also used to set the <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.DataAccess" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.FillRowMethodName" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsDeterministic" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsPrecise" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.Name" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.SystemDataAccess" />, and <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.TableDefinition" /> properties of the function attribute.</summary><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsDeterministic">
- <summary>Indicates whether the user-defined function is deterministic.</summary><value>
- <see langword="true" /> if the function is deterministic; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- A user-defined function is said to be deterministic if it always produces the same output values given the same input values and the same database state.
- The <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsDeterministic%2A> property is also useful for indexing the result of the function in the form of indexed computed columns and indexed views. If this property is not specified, the function is assumed to be non-deterministic.
- Functions that access local data can be deterministic. The data access characteristic is captured separately by the <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.DataAccess%2A> and <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.SystemDataAccess%2A> properties.
- Note that data access to remote servers (for example, using a <xref:Microsoft.Data.SqlClient.SqlConnection> to connect to another SQL Server instance) is available in user-defined functions. However, you must still honor the <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsDeterministic%2A> declaration. If the common language runtime (CLR) function is marked as deterministic, it should not cause side-effects in the remote server. While side-effects against the context connection are restricted, SQL Server will not enforce the restriction for side-effects over remote connections.
- The default value of this attribute is `false`.
- Do not mark a function as deterministic if the function does not always produce the same output values, given the same input values and the same database state. Marking a function as deterministic when the function is not truly deterministic can result in corrupted indexed views and computed columns.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.DataAccess">
- <summary>Indicates whether the function involves access to user data stored in the local instance of SQL Server.</summary><value>
- <see cref="T:Microsoft.Data.SqlClient.Server.DataAccessKind" />.<see langword="None" />: Does not access data. <see cref="T:Microsoft.Data.SqlClient.Server.DataAccessKind" />.<see langword="Read" />: Only reads user data.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default is <xref:Microsoft.Data.SqlClient.Server.DataAccessKind.None>.<xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.DataAccess%2A> is also required when connecting to remote servers if transactions integration is required (the default).
- If a Transact-SQL query is executed from inside a table-valued function (TVF), the <xref:Microsoft.Data.SqlClient.Server.DataAccessKind.Read> property should be set.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.SystemDataAccess">
- <summary>Indicates whether the function requires access to data stored in the system catalogs or virtual system tables of SQL Server.</summary><value>
- <see cref="T:Microsoft.Data.SqlClient.Server.DataAccessKind" />.<see langword="None" />: Does not access system data. <see cref="T:Microsoft.Data.SqlClient.Server.DataAccessKind" />.<see langword="Read" />: Only reads system data.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default is <xref:Microsoft.Data.SqlClient.Server.SystemDataAccessKind.None>.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsPrecise">
- <summary>Indicates whether the function involves imprecise computations, such as floating point operations.</summary><value>
- <see langword="true" /> if the function involves precise computations; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Precision of a function is one of the properties used to determine if computed columns that use this function can be indexed.
- The default value of this attribute is `false`.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.Name">
- <summary>The name under which the function should be registered in SQL Server.</summary><value>A <see cref="T:System.String" /> value representing the name under which the function should be registered.</value><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.TableDefinition">
- <summary>A string that represents the table definition of the results, if the method is used as a table-valued function (TVF).</summary><value>A <see cref="T:System.String" /> value representing the table definition of the results.</value><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.FillRowMethodName">
- <summary>The name of a method in the same class which is used to fill a row of data in the table returned by the table-valued function.</summary><value>A <see cref="T:System.String" /> value representing the name of a method in the same class which is used to fill a row of data in the table returned by the table-valued function.</value>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.SqlMetaData">
- <summary>Specifies and retrieves metadata information from parameters and columns of <see cref="T:Microsoft.Data.SqlClient.Server.SqlDataRecord" /> objects. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name and type.</summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="name" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException">A <see langword="SqlDbType" /> that is not allowed was passed to the constructor as <paramref name="dbType" />.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Boolean,System.Boolean,Microsoft.Data.SqlClient.SortOrder,System.Int32)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="useServerDefault">Specifies whether this column should use the default server value.</param><param name="isUniqueKey">Specifies if the column in the table-valued parameter is unique.</param><param name="columnSortOrder">Specifies the sort order for a column.</param><param name="sortOrdinal">Specifies the ordinal of the sort column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, and default server. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column.</summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Byte,System.Byte)">
- <param name="name">The name of the parameter or column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="precision">The precision of the parameter or column.</param><param name="scale">The scale of the parameter or column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, precision, and scale.</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Only the following `SqlDbType` is allowed to be passed to the constructor as `dbType`: `Decimal`.
- The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionDatabase%2A>, <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionName%2A>, <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionOwningSchema%2A>, and <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.Type%2A> properties are set to `null`):
- |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options|
- |---------------|--------------------|---------------|-----------|------------|---------------------|
- |Decimal|9|18|0|0|None|
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="name" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException">A <see langword="SqlDbType" /> that is not allowed was passed to the constructor as <paramref name="dbType" />, or <paramref name="scale" /> was greater than <paramref name="precision" />.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Byte,System.Byte,System.Boolean,System.Boolean,Microsoft.Data.SqlClient.SortOrder,System.Int32)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="precision">The precision of the parameter or column.</param><param name="scale">The scale of the parameter or column.</param><param name="useServerDefault">Specifies whether this column should use the default server value.</param><param name="isUniqueKey">Specifies if the column in the table-valued parameter is unique.</param><param name="columnSortOrder">Specifies the sort order for a column.</param><param name="sortOrdinal">Specifies the ordinal of the sort column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, precision, scale, and server default. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column.</summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Int64)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="maxLength">The maximum length of the specified type.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, and maximum length.</summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="name" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException">A SqlDbType that is not allowed was passed to the constructor as <paramref name="dbType" />.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Int64,System.Boolean,System.Boolean,Microsoft.Data.SqlClient.SortOrder,System.Int32)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="maxLength">The maximum length of the specified type.</param><param name="useServerDefault">Specifies whether this column should use the default server value.</param><param name="isUniqueKey">Specifies if the column in the table-valued parameter is unique.</param><param name="columnSortOrder">Specifies the sort order for a column.</param><param name="sortOrdinal">Specifies the ordinal of the sort column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, maximum length, and server default. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column.</summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Int64,System.Byte,System.Byte,System.Int64,System.Data.SqlTypes.SqlCompareOptions,System.Type)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="maxLength">The maximum length of the specified type.</param><param name="precision">The precision of the parameter or column.</param><param name="scale">The scale of the parameter or column.</param><param name="locale">The locale ID of the parameter or column.</param><param name="compareOptions">The comparison rules of the parameter or column.</param><param name="userDefinedType">A <see cref="T:System.Type" /> instance that points to the UDT.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, maximum length, precision, scale, locale ID, compare options, and user-defined type (UDT).</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Only the following are allowed to be passed to the constructor as `dbType`: `BigInt`, `Bit`, `BitInt`, `DateTime`, `Decimal`, `Float`, `Image`, `Int`, `Money`, `Ntext`, `Numeric`, `Real`, `SmallDateTime`, `SmallInt`, `SmallMoney`, `Text`, `TimeStamp`, `TinyInt`, `UniqueIdentifier`, `Variant`, `Xml`.
- The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionDatabase%2A>, <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionName%2A>, <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionOwningSchema%2A>, and <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.Type%2A> properties are set to `null`):
- |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options|
- |---------------|--------------------|---------------|-----------|------------|---------------------|
- |`BigInt`|8|19|0|0|None|
- |`Bit`|1|1|0|0|None|
- |`DateTime`|8|23|3|0|None|
- |`Decimal`|9|18|0|0|None|
- |`Float`|8|53|0|0|None|
- |`Image`|Max (-1)|0|0|0|None|
- |`Int`|4|10|0|0|None|
- |`Money`|8|19|4|0|None|
- |`Ntext`|Max (-1)|0|0|\<thread>|IgnoreCase, IgnoreKanaType, IgnoreWidth|
- |`Real`|4|24|0|0|None|
- |`Row`|\<number of columns>|0|0|0|None|
- |`SmallDateTime`|4|16|0|0|None|
- |`SmallInt`|2|5|0|0|None|
- |`SmallMoney`|4|10|4|0|None|
- |`Text`|Max (-1)|0|0|\<thread>|IgnoreCase, IgnoreKanaType, IgnoreWidth|
- |`TimeStamp`|8|0|0|0|None|
- |`TinyInt`|1|3|0|0|None|
- |`UniqueIdentifier`|16|0|0|0|None|
- |`UDT`|\<Max length of the type> or -1|0|0|0|None|
- |`Variant`|8016|0|0|0|None|
- |`Xml`|Max (-1)|0|0|0|IgnoreCase, IgnoreKanaType, IgnoreWidth|
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="name" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException">A <see langword="SqlDbType" /> that is not allowed was passed to the constructor as <paramref name="dbType" />, or <paramref name="userDefinedType" /> points to a type that does not have <see cref="T:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute" /> declared.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Int64,System.Byte,System.Byte,System.Int64,System.Data.SqlTypes.SqlCompareOptions,System.Type,System.Boolean,System.Boolean,Microsoft.Data.SqlClient.SortOrder,System.Int32)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="maxLength">The maximum length of the specified type.</param><param name="precision">The precision of the parameter or column.</param><param name="scale">The scale of the parameter or column.</param><param name="localeId">The locale ID of the parameter or column.</param><param name="compareOptions">The comparison rules of the parameter or column.</param><param name="userDefinedType">A <see cref="T:System.Type" /> instance that points to the UDT.</param><param name="useServerDefault">Specifies whether this column should use the default server value.</param><param name="isUniqueKey">Specifies if the column in the table-valued parameter is unique.</param><param name="columnSortOrder">Specifies the sort order for a column.</param><param name="sortOrdinal">Specifies the ordinal of the sort column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, maximum length, precision, scale, locale ID, compare options, and user-defined type (UDT). This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column.</summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Int64,System.Int64,System.Data.SqlTypes.SqlCompareOptions)">
- <param name="name">The name of the parameter or column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="maxLength">The maximum length of the specified type.</param><param name="locale">The locale ID of the parameter or column.</param><param name="compareOptions">The comparison rules of the parameter or column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, maximum length, locale, and compare options.</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Only the following are allowed to be passed to the constructor as `dbType`: `Char`, `NChar`, `Ntext`, `NVarChar`, `Text`, `VarChar`.
- Only a `maxLength` specification of <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.Max%2A>, or -1, is allowed for a `dbType` of `Text` or `NText`.
- For a `dbType` of `Varchar` or `Nvarchar`, a length specification of <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.Max%2A>, or -1, declares the metadata as varchar(max) and nvarchar(max), respectively.
- The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionDatabase%2A>, <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionName%2A>, <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionOwningSchema%2A>, and <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.Type%2A> properties are set to `null`):
- |SqlDbType|Precision|Scale|
- |---------------|---------------|-----------|
- |`Char`|0|0|
- |`NChar`|0|0|
- |`NText`|0|0|
- |`NVarChar`|0|0|
- |`Text`|0|0|
- |`VarChar`|0|0|
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="name" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException">A SqlDbType that is not allowed was passed to the constructor as <paramref name="dbType" />.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Int64,System.Int64,System.Data.SqlTypes.SqlCompareOptions,System.Boolean,System.Boolean,Microsoft.Data.SqlClient.SortOrder,System.Int32)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="maxLength">The maximum length of the specified type.</param><param name="locale">The locale ID of the parameter or column.</param><param name="compareOptions">The comparison rules of the parameter or column.</param><param name="useServerDefault">Specifies whether this column should use the default server value.</param><param name="isUniqueKey">Specifies if the column in the table-valued parameter is unique.</param><param name="columnSortOrder">Specifies the sort order for a column.</param><param name="sortOrdinal">Specifies the ordinal of the sort column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, maximum length, locale, compare options, and server default. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column.</summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.String,System.String,System.String)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="database">The database name of the XML schema collection of a typed XML instance.</param><param name="owningSchema">The relational schema name of the XML schema collection of a typed XML instance.</param><param name="objectName">The name of the XML schema collection of a typed XML instance.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, database name, owning schema, and object name.</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Only the following `SqlDbType` is allowed to be passed to the constructor as `dbType`: `Xml`.
- The following are the default values assigned to `dbType`, depending on the `SqlDbType`:
- |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options|
- |---------------|--------------------|---------------|-----------|------------|---------------------|
- |`Xml`|Max (-1)|0|0|0|IgnoreCase, IgnoreKanaType, IgnoreWidth|
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="name" /> is <see langword="null" />, or <paramref name="objectName" /> is <see langword="null" /> when <paramref name="database" /> and <paramref name="owningSchema" /> are non-<see langword="null" />.</exception><exception cref="T:System.ArgumentException">A SqlDbType that is not allowed was passed to the constructor as <paramref name="dbType" />.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.String,System.String,System.String,System.Boolean,System.Boolean,Microsoft.Data.SqlClient.SortOrder,System.Int32)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="database">The database name of the XML schema collection of a typed XML instance.</param><param name="owningSchema">The relational schema name of the XML schema collection of a typed XML instance.</param><param name="objectName">The name of the XML schema collection of a typed XML instance.</param><param name="useServerDefault">Specifies whether this column should use the default server value.</param><param name="isUniqueKey">Specifies if the column in the table-valued parameter is unique.</param><param name="columnSortOrder">Specifies the sort order for a column.</param><param name="sortOrdinal">Specifies the ordinal of the sort column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, database name, owning schema, object name, and default server. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column.</summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Type)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="userDefinedType">A <see cref="T:System.Type" /> instance that points to the UDT.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, and user-defined type (UDT).</summary><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Only the following `SqlDbType` is allowed to be passed to the constructor as `dbType`: `UDT`.
- The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionDatabase%2A>, <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionName%2A>, <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionOwningSchema%2A>, and <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.Type%2A> properties are set to `null`):
- |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options|
- |---------------|--------------------|---------------|-----------|------------|---------------------|
- |UDT|\<Max length of the type> or -1|0|0|0|None|
- ]]></format>
- </remarks><exception cref="T:System.ArgumentNullException">The <paramref name="name" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException">A SqlDbType that is not allowed was passed to the constructor as <paramref name="dbType" />, or <paramref name="userDefinedType" /> points to a type that does not have <see cref="T:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute" /> declared.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Type,System.String)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="userDefinedType">A <see cref="T:System.Type" /> instance that points to the UDT.</param><param name="serverTypeName">The SQL Server type name for <paramref name="userDefinedType" />.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, user-defined type (UDT), and SQLServer type.</summary>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.#ctor(System.String,System.Data.SqlDbType,System.Type,System.String,System.Boolean,System.Boolean,Microsoft.Data.SqlClient.SortOrder,System.Int32)">
- <param name="name">The name of the column.</param><param name="dbType">The SQL Server type of the parameter or column.</param><param name="userDefinedType">A <see cref="T:System.Type" /> instance that points to the UDT.</param><param name="serverTypeName">The SQL Server type name for <paramref name="userDefinedType" />.</param><param name="useServerDefault">Specifies whether this column should use the default server value.</param><param name="isUniqueKey">Specifies if the column in the table-valued parameter is unique.</param><param name="columnSortOrder">Specifies the sort order for a column.</param><param name="sortOrdinal">Specifies the ordinal of the sort column.</param><summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> class with the specified column name, type, user-defined type, SQL Server type, and server default. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column.</summary><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.CompareOptions">
- <summary>Gets the comparison rules used for the column or parameter.</summary><value>The comparison rules used for the column or parameter as a <see cref="T:System.Data.SqlTypes.SqlCompareOptions" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.DbType">
- <summary>Gets the data type of the column or parameter.</summary><value>The data type of the column or parameter as a <see cref="T:System.Data.DbType" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The default type is <xref:System.Data.DbType>.`String`.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.IsUniqueKey">
- <summary>Indicates if the column in the table-valued parameter is unique.</summary><value>A <see langword="Boolean" /> value.</value><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.LocaleId">
- <summary>Gets the locale ID of the column or parameter.</summary><value>The locale ID of the column or parameter as a <see cref="T:System.Int64" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value is the current locale of the current thread for string-valued SqlDbTypes, and 0 for SqlDbTypes that do not support collation.
- Returns 0 if the collation of the underlying column type is not defined.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.Max">
- <summary>Gets the length of <see langword="text" />, <see langword="ntext" />, and <see langword="image" /> data types.</summary><value>The length of <see langword="text" />, <see langword="ntext" />, and <see langword="image" /> data types.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value is -1.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.MaxLength">
- <summary>Gets the maximum length of the column or parameter.</summary><value>The maximum length of the column or parameter as a <see cref="T:System.Int64" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The potential maximum length for values of the specified column. Returns 0 for types other than fixed and varying length character and binary types. For variable size columns or parameters declared with the `Max` constructor parameter, it returns -1.
- For <xref:System.Data.DbType>.`Row` this returns the number of columns in the row metadata instance.
- The default value is 0.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.Name">
- <summary>Gets the name of the column or parameter.</summary><value>The name of the column or parameter as a <see cref="T:System.String" />.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.Precision">
- <summary>Gets the precision of the column or parameter.</summary><value>The precision of the column or parameter as a <see cref="T:System.Byte" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Returns 0 if the precision of the underlying column type is not defined.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.Scale">
- <summary>Gets the scale of the column or parameter.</summary><value>The scale of the column or parameter.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Returns 0 if the scale of the underlying column type is not defined.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.SortOrder">
- <summary>Returns the sort order for a column.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.SortOrder" /> object.</value><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.SortOrdinal">
- <summary>Returns the ordinal of the sort column.</summary><value>The ordinal of the sort column.</value><remarks>
- <format type="text/markdown"><.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.SqlDbType">
- <summary>Gets the data type of the column or parameter.</summary><value>The data type of the column or parameter as a <see cref="T:System.Data.DbType" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value is `NVarChar`.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.Type">
- <summary>Gets the common language runtime (CLR) type of a user-defined type (UDT).</summary><value>The CLR type name of a user-defined type as a <see cref="T:System.Type" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value is `null`.
- Returns `null` if <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.SqlDbType%2A> is not a UDT type. `Null` may also returned for valid UDT result sets where the assembly is not available to the application.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.TypeName">
- <summary>Gets the three-part name of the user-defined type (UDT) or the SQL Server type represented by the instance.</summary><value>The name of the UDT or SQL Server type as a <see cref="T:System.String" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value is `null`.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.UseServerDefault">
- <summary>Reports whether this column should use the default server value.</summary><value>A <see langword="Boolean" /> value.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default is `FALSE`.
- This property can only be set in one of the <xref:Microsoft.Data.SqlClient.Server.SqlMetaData> constructors.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionDatabase">
- <summary>Gets the name of the database where the schema collection for this XML instance is located.</summary><value>The name of the database where the schema collection for this XML instance is located as a <see cref="T:System.String" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value is `null`.
- This property may be `null` if the collection is defined within the current database. It is also `null` if there is no schema collection, in which case <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionName%2A> and <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionOwningSchema%2A> are also null.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionName">
- <summary>Gets the name of the schema collection for this XML instance.</summary><value>The name of the schema collection for this XML instance as a <see cref="T:System.String" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value is `null`.
- This value is `null` if there is no associated schema collection. If the value is `null`, then <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionDatabase%2A> and <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionOwningSchema%2A> are also `null`.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionOwningSchema">
- <summary>Gets the owning relational schema where the schema collection for this XML instance is located.</summary><value>The owning relational schema where the schema collection for this XML instance is located as a <see cref="T:System.String" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The default value is `null`.
- This value may be `null` if the collection is defined within the current database and default schema. It is also null if there is no schema collection, in which case <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionDatabase%2A> and <xref:Microsoft.Data.SqlClient.Server.SqlMetaData.XmlSchemaCollectionName%2A> are also `null`.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Boolean)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Boolean" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Boolean" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Byte)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Byte" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Byte" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Byte[])">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified array of <see cref="T:System.Byte" /> values against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as an array of <see cref="T:System.Byte" /> values.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Char)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Char" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Char" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Char[])">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified array of <see cref="T:System.Char" /> values against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as an array <see cref="T:System.Char" /> values.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlBinary)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlBinary" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlBinary" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlBoolean)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlBoolean" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlBoolean" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlByte)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlByte" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlByte" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlBytes)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlBytes" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlBytes" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlChars)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlChars" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlChars" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlDateTime)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlDateTime" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlDateTime" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlDecimal)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlDecimal" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlDecimal" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlDouble)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlDouble" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlDouble" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlGuid)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlGuid" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlGuid" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlInt16)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlInt16" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlInt16" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlInt32)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlInt32" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlInt32" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlInt64)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlInt64" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlInt64" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlMoney)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlMoney" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlMoney" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlSingle)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlSingle" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlSingle" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlString)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlString" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlString" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Data.SqlTypes.SqlXml)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Data.SqlTypes.SqlXml" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Data.SqlTypes.SqlXml" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.DateTime)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.DateTime" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.DateTime" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.DateTimeOffset)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.DateTimeOffset" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as an array of <see cref="T:System.DateTimeOffset" /> values.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Decimal)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Decimal" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Decimal" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Double)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Double" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Double" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Guid)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Guid" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Guid" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Int16)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Int16" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Int16" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Int32)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Int32" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Int32" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Int64)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Int64" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Int64" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Object)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Object" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Object" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.Single)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.Single" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.Single" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.String)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.String" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as a <see cref="T:System.String" />.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.Adjust(System.TimeSpan)">
- <param name="value">The value to validate against the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Validates the specified <see cref="T:System.TimeSpan" /> value against the metadata, and adjusts the value if necessary.</summary><returns>The adjusted value as an array of <see cref="T:System.TimeSpan" /> values.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentException">
- <paramref name="value" /> does not match the <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> type, or <paramref name="value" /> could not be adjusted.</exception>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMetaData.InferFromValue(System.Object,System.String)">
- <param name="value">The object used from which the metadata is inferred.</param><param name="name">The name assigned to the returned <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</param><summary>Infers the metadata from the specified object and returns it as a <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</summary><returns>The inferred metadata as a <see cref="T:Microsoft.Data.SqlClient.Server.SqlMetaData" /> instance.</returns><remarks>To be added.</remarks><exception cref="T:System.ArgumentNullException">The <paramref name="value" /> is <see langword="null" />.</exception>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.SqlMethodAttribute">
- <summary>Indicates the determinism and data access properties of a method or property on a user-defined type (UDT). The properties on the attribute reflect the physical characteristics that are used when the type is registered with SQL Server.</summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.#ctor">
- <summary>An attribute on a user-defined type (UDT), used to indicate the determinism and data access properties of a method or a property on a UDT.</summary><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.OnNullCall">
- <summary>Indicates whether the method on a user-defined type (UDT) is called when <see langword="null" /> input arguments are specified in the method invocation.</summary><value> <see langword="true" /> if the method is called when <see langword="null" /> input arguments are specified in the method invocation; <see langword="false" /> if the method returns a <see langword="null" /> value when any of its input parameters are <see langword="null" />. If the method cannot be invoked (because of an attribute on the method), the SQL Server <see langword="DbNull" /> is returned.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- The default value of the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.OnNullCall%2A> property is `true`.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator">
- <summary>Indicates whether a method on a user-defined type (UDT) is a mutator.</summary><value> <see langword="true" /> if the method is a mutator; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- If the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator%2A> property is set to `true` and the return type of the method is `void`, SQL Server marks the method as a mutator. A mutator method is one that causes a state change in the UDT instance. Mutator methods can be called in assignment statements or data modification statements, but cannot be used in queries. If a method is marked as a mutator but does not return void, then CREATE TYPE does not fail with an error. Even though a returned value other than `void` does not raise an error, the returned value is not accessible and cannot be used.
- The default value of the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator%2A> property is `false`.
- A property can be a mutator if <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> is used on the setter and <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator%2A> is set to `true`. However, a property setter is implicitly treated as a mutator, so it is not necessary to set the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator%2A> property of the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> to `true`.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.InvokeIfReceiverIsNull">
- <summary>Indicates whether SQL Server should invoke the method on null instances.</summary><value> <see langword="true" /> if SQL Server should invoke the method on null instances; otherwise, <see langword="false" />. If the method cannot be invoked (because of an attribute on the method), the SQL Server <see langword="DbNull" /> is returned.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The default value of the `InvokeIfReceiverIsNull` property is `false`. That is, the method is not invoked on a null instance. If `InvokeIfReceiverIsNull` is `true`, the return value of the method depends upon its type. If the return type of the method is nullable, the distinguished null value for the type is returned. If the return type is non-nullable, the default CLR value for the type is returned. The default value for reference types is `null`. The default value for a value type is the value that is returned when you call the parameterless constructor for the type.
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute">
- <summary>Indicates that the type should be registered as a user-defined aggregate. The properties on the attribute reflect the physical attributes used when the type is registered with SQL Server. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSizeValue">
- <summary>The maximum size, in bytes, required to store the state of this aggregate instance during computation.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- An <xref:System.Int32> value representing the maximum size of the aggregate instance.
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.#ctor(Microsoft.Data.SqlClient.Server.Format)">
- <param name="format">One of the <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> values representing the serialization format of the aggregate.</param><summary>A required attribute on a user-defined aggregate, used to indicate that the given type is a user-defined aggregate and the storage format of the user-defined aggregate.</summary>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSize">
- <summary>The maximum size, in bytes, of the aggregate instance.</summary><value>An <see cref="T:System.Int32" /> value representing the maximum size of the aggregate instance.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- This property does not have to be specified for Native format serialization.
- You must specify the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSize%2A> property with the UserDefined serialization <xref:Microsoft.Data.SqlClient.Server.Format>.
- The maximum allowed value for this property is specified by the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSizeValue> field.
- The maximum size allowed is 2 gigabytes (GB). You can specify a number from 1 to 8000 bytes, or -1 to represent a value larger than 8000 bytes, up to 2 gigabytes.
- For an aggregate with user-defined serialization specified, <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSize%2A> refers to the total size of the serialized data. Consider an aggregate serializing a string of 10 characters (<xref:System.Char>). When the string is serialized using a <xref:System.IO.BinaryWriter>, the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSize%2A>, the total size of the serialized data must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.IsInvariantToDuplicates">
- <summary>Indicates whether the aggregate is invariant to duplicates.</summary><value> <see langword="true" /> if the aggregate is invariant to duplicates; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Used by the query processor, this property is `true` if the aggregate is invariant to duplicates. That is, the aggregate of S, {X} is the same as aggregate of S when X is already in S. For example, aggregate functions such as MIN and MAX satisfy this property, while SUM does not.
- Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects both the plan selected and the results returned by the query.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.IsInvariantToNulls">
- <summary>Indicates whether the aggregate is invariant to nulls.</summary><value> <see langword="true" /> if the aggregate is invariant to nulls; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Used by the query processor, this property is `true` if the aggregate is invariant to nulls. That is, the aggregate of S, {NULL} is the same as aggregate of S. For example, aggregate functions such as MIN and MAX satisfy this property, while COUNT(*) does not.
- Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.IsInvariantToOrder">
- <summary>Indicates whether the aggregate is invariant to order.</summary><value> <see langword="true" /> if the aggregate is invariant to order; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Reserved for future use. This property is not currently used by the query processor: order is currently not guaranteed.
- Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.
- The default value for this property is `false`.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.IsNullIfEmpty">
- <summary>Indicates whether the aggregate returns <see langword="null" /> if no values have been accumulated.</summary><value> <see langword="true" /> if the aggregate returns <see langword="null" /> if no values have been accumulated; otherwise <see langword="false" />.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- Used by the query processor, this property is `true` if the aggregate returns `null` if no values have been accumulated.
- Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.Format">
- <summary>The serialization format as a <see cref="T:Microsoft.Data.SqlClient.Server.Format" />.</summary><value>A <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> representing the serialization format.</value><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.Name">
- <summary>The name of the aggregate.</summary><value>A <see cref="T:System.String" /> value representing the name of the aggregate.</value>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute">
- <summary>Used to mark a type definition in an assembly as a user-defined type (UDT) in SQL Server. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server. This class cannot be inherited.</summary><remarks>
- <format type="text/markdown">< for more information about UDTs, including an example of a UDT.
- ## Examples
- The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format.
- [!code-csharp[SqlUserDefinedType Example#1](~/../sqlclient/doc/samples/SqlUserDefinedType.cs#1)]
- ]]></format>
- </remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.#ctor(Microsoft.Data.SqlClient.Server.Format)">
- <param name="format">One of the <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> values representing the serialization format of the type.</param><summary>A required attribute on a user-defined type (UDT), used to confirm that the given type is a UDT and to indicate the storage format of the UDT.</summary><remarks>
- <format type="text/markdown"><]
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize">
- <summary>The maximum size of the instance, in bytes.</summary><value>An <see cref="T:System.Int32" /> value representing the maximum size of the instance.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- You must specify the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> property with the `UserDefined` serialization <xref:Microsoft.Data.SqlClient.Server.Format>.
- When connecting to SQL Server 2005 or earlier, <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> must be between 1 and 8000.
- When connecting to SQL Server 2008 or later, set <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> between 1 and 8000, for a type whose instances are always 8,000 bytes or less. For types that can have instances larger than 8000, specify -1.
- For a UDT with user-defined serialization specified, <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> refers to the total size of the UDT in its serialized form as defined by the user. Consider a UDT with a property of a string of 10 characters (<xref:System.Char>). When the UDT is serialized using a <xref:System.IO.BinaryWriter>, the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A>, the total size of the serialized UDT must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization.
- This property should not be used with `Native` serialization <xref:Microsoft.Data.SqlClient.Server.Format>.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsFixedLength">
- <summary>Indicates whether all instances of this user-defined type are the same length.</summary><value>
- <see langword="true" /> if all instances of this type are the same length; otherwise <see langword="false" />.
- </value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- If set to `true`, all instances of UDTs corresponding to this common language runtime (CLR) type must have a length in bytes exactly equal to <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A>. This attribute is only relevant for UDTs with `UserDefined` serialization <xref:Microsoft.Data.SqlClient.Server.Format>.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered">
- <summary>Indicates whether the user-defined type is byte ordered.</summary><value>
- <see langword="true" /> if the user-defined type is byte ordered; otherwise <see langword="false" /> .</value><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- When set to `true`, the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> property in effect guarantees that the serialized binary data can be used for semantic ordering of the information. Thus, each instance of a byte-ordered UDT object can only have one serialized representation. When a comparison operation is performed in SQL Server on the serialized bytes, its results should be the same as if the same comparison operation had taken place in managed code.
- The following features are supported when <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> is set to `true`:
- - The ability to create indexes on columns of this type.
- - The ability to create primary and foreign keys as well as CHECK and UNIQUE constraints on columns of this type.
- - The ability to use Transact-SQL ORDER BY, GROUP BY, and PARTITION BY clauses. In these cases, the binary representation of the type is used to determine the order.
- - The ability to use comparison operators in Transact-SQL statements.
- - The ability to persist computed columns of this type.
- Note that both the `Native` and `UserDefined` serialization formats support the following comparison operators when <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> is set to `true`:
- - Equal to (=)
- - Not equal to (!=)
- - Greater than (>)
- - Less than (\<)
- - Greater than or equal to (>=)
- - Less than or equal to (<=)
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.Format">
- <summary>The serialization format as a <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> .</summary><value>A <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> value representing the serialization format.</value>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.ValidationMethodName">
- <summary>The name of the method used to validate instances of the user-defined type.</summary><value>A <see cref="T:System.String" /> representing the name of the method used to validate instances of the user-defined type.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The method specified by this attribute validates instances of the UDT when the UDT has been deserialized from a binary value that is not trusted.
- ]]></format>
- </remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.Name">
- <summary>The SQL Server name of the user-defined type.</summary><value>A <see cref="T:System.String" /> value representing the SQL Server name of the user-defined type.</value><remarks>
- <format type="text/markdown"><![CDATA[
- ## Remarks
- The <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.Name%2A> property is not used within SQL Server, but is used by the Microsoft Visual Studio .NET Integrated Development Environment (IDE).
- ]]></format>
- </remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.Server.SystemDataAccessKind">
- <summary>Describes the type of access to system data for a user-defined method or function.</summary><remarks>
- <format type="text/markdown"><![CDATA[
-
- ## Remarks
- Describes the type of access to system data for a user-defined method or function.
-
- This enumeration is used in <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> and <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute> to indicate what type of access to system data the method or function has.
-
- Note that methods and functions are not allowed to make changes to the database, so the options for this enumeration are `None` (meaning no data-access performed by the method or function) and `Read` (meaning that the method or function performs read-only data-access operations, such as executing SELECT statements).
-
- ]]></format>
- </remarks>
- </member>
- <member name="F:Microsoft.Data.SqlClient.Server.SystemDataAccessKind.None">
- <summary>The method or function does not access system data.</summary>
- </member>
- <member name="F:Microsoft.Data.SqlClient.Server.SystemDataAccessKind.Read">
- <summary>The method or function reads system data.</summary>
- </member>
- <member name="T:Microsoft.Data.SqlClient.DataClassification.ColumnSensitivity">
- <summary>Represents the Data Classification Sensitivity Information for columns as configured in Database.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.DataClassification.ColumnSensitivity.#ctor(System.Collections.Generic.IList{Microsoft.Data.SqlClient.DataClassification.SensitivityProperty})">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.DataClassification.ColumnSensitivity" /> class.</summary>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.ColumnSensitivity.SensitivityProperties">
- <summary>Returns the list of sensitivity properties as received from Server for this 'ColumnSensitivity' information</summary><value>List of sensitivity properties.</value><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.DataClassification.InformationType">
- <summary>Represents the Data Classification Information Types as received from SQL Server for the active 'SqlDataReader'</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.DataClassification.InformationType.#ctor(System.String,System.String)">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.DataClassification.InformationType" /> class.</summary>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.InformationType.Id">
- <summary>Gets the ID for this 'InformationType' object</summary><value>ID of InformationType.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.InformationType.Name">
- <summary>Gets the name for this 'InformationType' object</summary><value>Name of InformationType.</value><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.DataClassification.Label">
- <summary>Represents the Data Classification Labels as received from SQL Server for the active 'SqlDataReader'</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.DataClassification.Label.#ctor(System.String,System.String)">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.DataClassification.Label" /> class.</summary>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.Label.Id">
- <summary>Gets the ID for this 'Label' object</summary><value>ID of label.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.Label.Name">
- <summary>Gets the name for this 'Label' object</summary><value>Name of label.</value><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.DataClassification.SensitivityClassification">
- <summary>Provides the functionlity to retrieve Sensitivity Classification data as received from SQL Server for the active 'SqlDataReader'</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.DataClassification.SensitivityClassification.#ctor(System.Collections.Generic.IList{Microsoft.Data.SqlClient.DataClassification.Label},System.Collections.Generic.IList{Microsoft.Data.SqlClient.DataClassification.InformationType},System.Collections.Generic.IList{Microsoft.Data.SqlClient.DataClassification.ColumnSensitivity})">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.DataClassification.SensitivityClassification" />
- class.</summary>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.SensitivityClassification.ColumnSensitivities">
- <summary>Returns the column sensitivity for this 'SensitivityClassification' Object</summary><value>List of column sensitivities.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.SensitivityClassification.InformationTypes">
- <summary>Returns the information types collection for this 'SensitivityClassification' Object</summary><value>List of information types.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.SensitivityClassification.Labels">
- <summary>Returns the labels collection for this 'SensitivityClassification' Object</summary><value>List of labels.</value><remarks>To be added.</remarks>
- </member>
- <member name="T:Microsoft.Data.SqlClient.DataClassification.SensitivityProperty">
- <summary>Represents the Data Classification Sensitivity Information for columns as configured in Database.</summary><remarks>To be added.</remarks>
- </member>
- <member name="M:Microsoft.Data.SqlClient.DataClassification.SensitivityProperty.#ctor(Microsoft.Data.SqlClient.DataClassification.Label,Microsoft.Data.SqlClient.DataClassification.InformationType)">
- <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.DataClassification.SensitivityProperty" /> class.</summary>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.SensitivityProperty.InformationType">
- <summary>Returns the information type for this 'SensitivityProperty' Object</summary><value>Information type for this SensitivityProperty.</value><remarks>To be added.</remarks>
- </member>
- <member name="P:Microsoft.Data.SqlClient.DataClassification.SensitivityProperty.Label">
- <summary>Returns the label for this 'SensitivityProperty' Object</summary><value>Label for this SensitivityProperty.</value><remarks>To be added.</remarks>
- </member>
- </members>
- </doc>
|