none
Problema conversão RRS feed

  • Pergunta

  • Tenho a seguinte Proc. abaixo, e ao executar apresenta a seguinte informacao:


    ALTER procedure [dbo].[Sp_InsereFoto]

    @foto varbinary(max),
    @cd_aluno numeric(18,0)
    as
    Declare @Cmd_Sql varchar(max)

    begin
      update cd_aluno set ds_foto = @foto  where cd_aluno = @cd_aluno

      set @Cmd_Sql  =  'update cd_aluno set ds_foto =' + @foto + 'where cd_aluno =' +convert(varchar(50),@cd_aluno)

      print @Cmd_Sql

    end


    Msg 402, Level 16, State 1, Procedure Sp_InsereFoto, Line 10
    The data types varchar and varbinary(max) are incompatible in the add operator.

    Obrigado.


    terça-feira, 17 de setembro de 2013 13:06

Respostas

  • Desculpe, esqueci de um detalhe

    set @Cmd_Sql  =  'update cd_aluno set ds_foto =' + convert(varchar(max),@foto,2) + 'where cd_aluno =' +convert(varchar(50),@cd_aluno)

    Veja se dessa forma te ajuda.


    "A vida é um paraíso, mas os homens não o sabem e não se preocupam em sabê-lo." Fiodor Dostoievski

    • Sugerido como Resposta Manigold terça-feira, 17 de setembro de 2013 14:50
    • Marcado como Resposta Giovani Cr terça-feira, 24 de setembro de 2013 14:33
    terça-feira, 17 de setembro de 2013 14:36
  • é o estilo de conversão que a função vai usar.

    Dá uma olhada AQUI.

    Abraço!


    "A vida é um paraíso, mas os homens não o sabem e não se preocupam em sabê-lo." Fiodor Dostoievski

    • Marcado como Resposta Giovani Cr terça-feira, 24 de setembro de 2013 14:33
    terça-feira, 17 de setembro de 2013 15:32

Todas as Respostas

  • Bom dia,

    O problema esta sendo na hora de setar a variável @Cmd_Sql que é um varchar(max) com o valor de @foto que é varbinary(max)

    tente assim

    set @Cmd_Sql  =  'update cd_aluno set ds_foto = @foto where cd_aluno =' +convert(varchar(50),@cd_aluno)
    


    [ ]´s,
    Lukas Baldan

    terça-feira, 17 de setembro de 2013 13:15
  • Deixa eu ver c entendi direito.

    você está tentando salvar uma imagem no banco de dados e quando tenta fazer isso está ocorrendo o erro?

    Eu faço isso da seguinte forma.

    Crio o variável do tipo Image e nela eu seto valores do binary pelo programa que vai invocar a SP.

    Segue exemplo:

    ALTER PROCEDURE [dbo].[spRelatorio_Binario_Update] (@id int, @Arquivo Image) 
    AS
    BEGIN
    	UPDATE sysRelatorios SET Arquivo = @Arquivo WHERE id = @id
    END

    Lembrando que o valor que a propriedade @Arquivo aceita é apenas Binário!!!

    No C# eu pego a imagem, e converto para um Array e Binário e Mando para a SP.


    Thiago Juliano Para criar inimigos não é necessário declara guerra. Basta dizer o que pensa. (Martin Lutherking)

    terça-feira, 17 de setembro de 2013 13:26
  • Cara, muda o seu 

    set @Cmd_Sql  =  'update cd_aluno set ds_foto =' + @foto + 'where cd_aluno =' +convert(varchar(50),@cd_aluno)

    Por:

    set @Cmd_Sql  =  'update cd_aluno set ds_foto =' + convert(varchar(max),@foto) + 'where cd_aluno =' +convert(varchar(50),@cd_aluno)

    Isso deve resolver seu problema.

    Abraço!


    "A vida é um paraíso, mas os homens não o sabem e não se preocupam em sabê-lo." Fiodor Dostoievski

    terça-feira, 17 de setembro de 2013 14:08
  • Olá amigo fiz a alteração mas o valor recebido da imagem foi esse:

    update cd_aluno set ds_foto = Ï Ó JFIF  ` `   █ C  
    
     $.' ",#(7),01444'9=82<.342 █ C 

    2!!22222222222222222222222222222222222222222222222222 └  ­@"  ─           
    ─ Á   } !1AQa"q2üæí#B▒┴RЭ$3bré
    %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzâäàåçêëèÆôöòûùÿÖÜóúñѪº¿®¬▓│┤ÁÂÀ©╣║┬├─┼ãÃ╚╔╩ÊËÈıÍÎÏ┘┌ßÔÒõÕµþÞÚÛ±‗¾¶§÷¸°¨· ─        
    ─ Á  w !1AQaq"2üBæí▒┴ #3R­brÐ
    $4ß%±&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzéâäàåçêëèÆôöòûùÿÖÜóúñѪº¿®¬▓│┤ÁÂÀ©╣║┬├─┼ãÃ╚╔╩ÊËÈıÍÎÏ┘┌ÔÒõÕµþÞÚÛ‗¾¶§÷¸°¨· ┌   ? ­╝Ë├qQf£«ô1µîËAÑ╬(╣Ôó¤´*M▄T_ÃI쩺¯ZÇ(-═R8À╠)┘¿│ô@4&"└~*▓ƒÌ~³âPí¨ì&¯▒HãÇ}i«xº{Ç╔█"╗_åû┼»þ╣?uSgÔpkêÿõ
    ¶/åG¸7Cuü¤Í╣▒Õfö¤H?vá=jf?)¬µ╝ËaÓʵúØÜ.4?4Ój,ʯÔïü(4╣¿C{Ê´ÝL5&═(jä=884 D┼▒NTåzËÀPÿNíNVª-╔âRâQJØ┼È£¿ÀSü4ÍáJ×
    B
    8`L
    (85yº®═0%öêp4ÅùA═;4▄±└Ñ»SCö@zðOÇÒÌöÊlaÜ`¹ÈÒLzå4Nögè(Z d&yѪâ¾RsMÇñÓd|ôNo╗Mî§ñÏÐ(843føÜF4êõ9»G°d©Â¥o÷ð╚ÎøÀ&¢Wß╠"=õ´$Ã>Ï═ëù©═ v«~Z«[×Á#ƒûí5þÜÄ
    AjgJLÔÿ╔qI┐èîÜì×ñ.Cq½┴o1ëÀ\gÎms  -¥°Î15ÐÜ‗Y;3Æ>ÖÔÑ 0»wc┌ă*r▄Ú╣hëçıjEͼ┐þÂ>¬Er═$ÄÑ2T
    ¬G\sJý_Pó·││MR╠¾÷¿┐þ®Ê¯'¹│F┘¶pk¤¤0╗´├) ZÄûiÍ4}ÑÅRx³h÷êY6Ñ▒ÚjϺµqÛ£ñ╬¢°b*°Í§;W┌ËÂpÍ├uíT]LÕòM=$Ä°?¢H»\<>+¢Q¹╚óÉ{n?òh█°ÂÃØj╦ƒ¯8?╬»Öw9þùÎÅKØPlËâV]Ä®o¿+4¥_╝qè┤fTÖÇ®'gí(¥VÁ.ºå¼±{?Îà  }èzÌ@Õ┤¸ÏóÞ9v/ºå¬kpçú®·0®ä╣þzË╣<¡nY
    N═V fù═ºt#µ_¡<¶Ñxdìè║2ÀíR)1ü═z¼þiî)hQKÄ)XBvª¢O?SMÜû4H~4vñ'Ü░xcJ94ðyÑíÇñ±┼"fâÊæx®Û£ËX¾H
    !õ˺¡z´ÇF▀
    ├¯ýZ‗#╦
    ÷?&¤
    ┌{éS\xørÜ├cóöÍ~ÑzÂ2▄░╚LqWe5╠°║ÕD©à║░_µ+Ä*‗HÂ═M3Q]J┼.T æÇ}
    YÆUì 1Ó Îƒh~*Â˼RÊDɃƒÎ$ÜÍoZ_F±BÝ¢öǽ®M┼¥ãöù┤ÜÅÖÁ²ñýN¦á}(7R8 æ╚ý+¬õst¼UÖ´²VÜ┘ \y╩Æ*uË└
    °TéAÄ*│_2¦¼maγ²*╣cs[═Æø<w¿×─7z▒µdu¿º©‗bgÛE&æQ¢¶)╔ªpyÅ┬½ÂûG"N~òá│ÖcV■­═5øÌ│qOSU)mªH3çë-.%m╠┴Å╣½ƒhVÉáÛ:ÊûñÔì9اEO&ÓZ¨A@¹©Ù×òÀÖNLl=±Üð2þ8º,╝·ÈXI█íºßÇÐ┼rH<▓ÅðÍå®9█3¸ÿ¶¼8¯Jt$}
    JÎ&UÏ£t╔«ê╩ÃÖSþ_┌\cÒ¿¿¸63┐ÉzT└íªö¸®ô¾;Æðhöס═XèVR0qU╠$jDVSUXÖ┴3VÖ╩é&É}Èìtºi?QU!ôÑ8╚Ñ▓k}╬GJ/xØû98dI=ÖA¿ÕÄ┬t┘6øa   j¦3¨Ô╝u5}B26^╬1█~Ø\Å┼Z─@bÙw¹╦ÜÐh|Ô┐Fz[Þ~É7ƒß¹&║B>ÿ5ë{ÓÅ ╬KCı░=Ælųxµó±ãªÿÌ▒?«A½Q°¯l■÷╬2=øJRAv╔$°sº╚Oæ®╬¥üúV■ó¿I­ÊÝI0Û´ÞYk^Z ûÆí÷ ı°|oñ╣ÜE>ÙMUƒqkıT¥ÍÒ╬ÏÓÉv█(╬│þ­«À ├i‗■┴
    ³½Ëc±Å4ä¡‗¦£ÒJ׶Ùç`ùP╚╠sÇ▄µ»█¥íh÷<n]+PÇÔ[)˲Þ╚¬¼¼äåR§¶
    EÁF­:µ©ê n"ü<┤¾êg-┤g?Øm
    «[ó]Å5=)WÑ+îRòOq0═`Ê═/C╚íêoV»l­È~Vàd×æ/‗»à<╦äO´0¯zlb(c ²+ï▓5å┼ëN3\'îµ"¥«Þ·ı▄╠▄¾ƒMùT=K¶  9«zJ‗E│înñÍûìôt[=▒Yñ¾ZÜ*Ò{zÜÙ─iMØz¥"'UÓ
    ÂƱYq¥*╠rf╝öý¤®q4╝ý═FQZa'±
    «$º +E+ÆòïóOzÄ\Jà[í¿âð_Øð$H©E
    :
    FjîÜ3Rõçb$î¼╠¨ÛiÕ╣ÙHZÿÃ5 ¢¸6]p:Êãv¿═5Ä)7ÒÁOA¯ë¸È++²®╣;qÊÉ?4ÓERÉX┤$Ò¡/ÿj¿nj@ÈËï╬MN%Ô¿ÓȽ&ERæ(║%"ù═
    ┴¬éLRç┴¬Rv&─2x"æ
    ¶Ç  ÂÇıI<p9Ä·  y«ÊGNÜL ¿ãzzÍñZdÀ1 `A2├FC§ÙÂ═=OÄW<╣³¬»(mñ  u╚■b¬╔ßØ^<µ╔ø▄`kı■├<$çéD  yiäl$¤zvh>GÉIñÛƒÌX▄/²│?ʬ╝o¨ı˲Õ"¢ú+█¨È2álà
    >½Ü¯+X±░└Å╝?:▄­Ñô]k16ù╠ϲwź[Js-Ø┤×ã1V,4Ù;2Z ha'»û©ªýıèî¼h"Æ MyWî/àÌ¡pT³êÌZ²Åþܶ═J­XÚùC¼hv  ╝x®»È%g|Æ:ƒZ┌Üð¤╗3ñð8º9ÔòEm}I Si¶├Ë4¶K?°³ïÅÒ╬¢╬▄mê█è±-"?3VÁO´Jú§»mC¹╝·Î)Ûæ┤v;|ª╝┐┼ôù┐  t¨ÎÑ▄Â#c▀Õ~ WùZÆ5\À ┬│í±▄®+¡ 3ÍÂtíÂ▀>ñÜá·u┌Äm▄~ºeE½é+LDËàô;▓©?mwÏÐW8ÙV#~jÆÜ×2qè¾Y¶▒w-縬÷¸¸ô!╬ı8¶ßN ÜH[z├þ¢EusõD׺└htY@æK«áÎb╩Â@╔µ£XcÜëXJH<P╗ ϵ¾¢®─Ò¢4¬!¨ §ñ,}(~C]└¯9 ÄN79½‗¬$╗Å%p*▒<ðÐm╔ª┤Bµö78═0j¦─h-áuAÆ╝Â9=)¿½\*MFQÅr ã£Îèç>¶í▓iåµ£Yd╔<˸¾MÞ+t- 3F³T
    ┘á┐4Èû┬º¿MqíÉV¸KQ!ÞfÁ?Å¡\Ê.ý4ϪuTéîË5Ö<çZ▀Õ ╚²*îz¿ÇyW:e¶j8╚çx?òzÎV>)s3ú¢¥│ıÓ0²ª=º╝r GþXÅßHè4æÙw üÐ┬7°Síߺ©âi=|╦Rº¨Uic▒║║_ý┼áeè=Þ║Û
    5ó³ì█!nÙÆƨd«‗©'Í▓Á{k╔QNÅo#´+±Üè‗[MB┴-­O¯>ÊOÒT-¶[┤o¶}n‗#ÏeYGÚP┌[½d9±í{ñF"yÊnÌÁ║░!àdV;Xdf▒5HÁ╚┬[\¦ñç ÆF§zµ­i┌JçlöM╝¸4¡¬HRÕÕ║2|E3Û æj æ▄¶¤oºS\┼Î├ƒå$ZC ?▄ÿZý³!`¸WÊjSîÓ³ä·þ¡w©ÚV¬4¶ÏN)h|´qÓ¤AØ·E╔ø´ÕYËi:ì┐X]G■¶L?Ñ},╩;u¿Ïn=*²½ýCè>cx┘>î1QÉ0kÚi¼-gû┌¹qâYùÐ.3µÚvñ×Ô0?òZ¬║í8ú├³3ÖÔ%=ñ ~âܧÕ? ÷ßÓmÍ{kgÀòz4RÅ└õUûð£ G8  }┐á«jÐþióËHÑ ┌╣┘4ks¬Kz╩ãG=¤÷³½®}°gm▄
    ýÐ■D  *®&ô¬Ó■¯┘  ¦Éâ·¡d®╔jçtbKi>¯+£╝ ]╩ Ó6+░øNı ¨┤Ú¹Æ!■Á╠¦ÚZ¬╠¯·eÏR─õDX~òö®Kó=,║qîøô3┴®Æóæ$äÔXÑî·<l┐╠SÆTÃ▀_╬▓ò9«ç╗Nñe│,âNSµÃ¢8«Êk7mt<sN═F┤6r=);2ëAѦ┼0)sBv) ´MS£Ð§í Üani[8÷ªË┼╬)w×öË═&}hI█A;¦NV!à3<RîPÍ╠ ╚ abMøCZ)%á²õ
    Q'5`PâÜI
    Rh¶¸ïZÁÖ¥╔¼ðgÕVɽc‗®c¥Íb}ÿ¸‗¯W«+ªÄ-ºµã+3[ÈcÁäà äq^▓Wg┼]læçuÔ¥
    flñéC‗▓╣òUkï]¨rG'╠>gH╔JyÄHmàÔB¾▄1Õó-qð~  KȲÏÀ*O╦añÌë^Ù├Î-║O│î§/S³¬Qiß®acìñÃ9Xs¶¡!Ô])F&Â║_·Úl@REgL-Á=K═ÀëpJîSWÙt7}ÁMÁ‗ÉHK0õ&¾╬+X║:ûá­ƒ¦½m¯s╔¡ìr³X┘¨(xÒhÃaÙY¥Â┼┌\╚╣ÓZj.Ìlò%~fw·Eá│ËßëF6»?Z¥MUéÞ:èƒpjIX/}E,iåöÜC@


    11))hªHÿñ█NñáCvJ
    ¹Ë¿ó└7fG<²j┤║m£  Ùm`ô²°ü■b¡ÊÐaªÍã4×ÐÑ9m6 }P■DUi|ú╚r▒¤  bv■╣«èè
    z▒┌O´9|jO¯o«ôËpV╚Ui< r¯u8╚  ªÉ³ìv¶áfº┘┼¶6Ä;ñyõ× Í¯=£┐÷ð«5¬»ßØv?¢ºo  «r½àzv(QPÞA¶7Äkê[┤¤&ùJÈÔ╬².Ýq㬣øóÔHªÅ²°Ïc¾ý█~┤ 9®xhÃ9®÷óÅ┬╦ü"ôý┬ôè÷ ┤█;ü¹ÙKy?▀ëO¶¬RxWCÿÕ┤╗p}Qv  *ƒ¬ã┌3Xþ1Ù╦Tdȸ2 ¶ÞRx#Eô;a×3■─ݲMTùß²ôÕ_]ÃÚØ¡²)}]Ñ╣┌t%%'uc¤└9ºón b╗>H?ıjèÙñ■F¬ÀüÁxÄb×Ê_┼ù·═ßñÂ:Vcçù┌9çR ╩Ìø┬zÛ1-b$  «R®■x¬2h║¼$¨ÜeðÃRw‗═OıþmìÒïú/åH╬j´T▓┴4g╔■¶l?ÑD Ó?ùBktZ®=Ϻì§ëNÍî(=÷Ô«(╝╣èK┘Õ*3┤rIªí¤A¨Uÿþ1ªırªk╗ƒ╚°¹Ö0°ÌÌ6┘=┐#©╚¡+Úk╚èqƒ÷àV×ãÍv,±½▄è«t[?ÛS‗ÑxàÎcbÙ┼┌Á®ÂÂì¥oö¯´MDïO┤g|*(╔┼R┤░åÐ┴ëB¾U<QyÂT▓å@Òhf+Û{~Í«*²tDÀuu2dÆM[R.¦ ÚÏ
    Úýá"¿+3F▒1Dç╠ıð├N+xã┌▓%+╗-ïÍ─Ç*‗9Ô¬@©qEg"ÔKÜ)úè3R04Ê8ºuª═lmªÆ¿ÉñÑóÇè(áóÆûÇ
    (óÿ Jj@h═ >ûÜ=iAáÑáQEÇP)└bÉP)Ç·ZAKHöbè Ôï ©óöQdyJ▄0{è»&òc6|╦;v¤¼c³*ϺN¦ü6|¯¥<ı▀H■è░×?╝~╬▄·Ò?Ò]$ƒ
    ¼ÄvO*·p¶¬¤­Í>v]À³ ){8ÅÖI±▓7X»Óµ¼'Å¡╚¨ýñ¤¹2ê®ß┤½¸nÒ?X╚■Á]■ÌÅ╗<'¾Êù│êËëm<sb├LÓ×▄ïGÄ}cYû¨ò┼¥r╗ç_OÕEº├ÙñÖL‗ª└y Ì╗½
    --aTU£iñ)I/çrKxÇ Ô»┼Á:|UÞíÚW&BCbÅÑXTÔ×æÓS±è╔ÜXïäTç├@ ÝM&×iî(┌)M%1 Fh4S óÆûÇ
    ZJ(hóè )i(ªà-4\¾@óø×iAª®i╣Ññ┴Ñø┌òqè u:Ü)┘ª ÑñÑ QOðih+ý¨ÝHm²½ª■╬PzR6×ÿÚE┼cÿ0{SLÊÀõ░ÙüP5û;Qp▒ìõJzC¤Jʹ!Ñ=mÇÝE┴"¼PtÔ¼ê­:T█÷áèÆæ)
    <èañ1ìL4‗)åü
    4┬iµú4! Aóè`%Qè )(óÿ-%ü KIEèJZqhñóÇ
    (ªèQ¤Z`<QMÑábËüÔÜ)hÓi┬ÿ)└µÇJ)╣ÑáKÜ`Ñ═0:ìÁèÉ░¿ÏµñðüÍáuþÑYsPÁ+2ÔÿELıRTfñjë¿îsL4ÒM4Xcÿi═M&òä0ËOZqªË┌(óØÇJ)i
    0è(ñJ)3E -ÆûÿéûÆûÇ
    ZJ(░═ ÓÊRâ@ûø£Ëü┼0ûô4╣áº
    fih░═8`4ñÔï ­hªâJ( Ø94ã8ñ-LfñXÍ95ôOcQ1═!\cêÜ{îðlrj'º×§ a4Í4Ôiåü 4ËN"ÜhºÑ4˹ËI³ÚÇ┌JZJ J)i(åèZJ (┼PKH)iÇRÊQJ└.(óè`┤ö┤ ¢)E74úÜ ~iE7¢-0E&ihGÛmüßMZQ@4ÊiÑ®¼sRX1¿ÿÊ▒┼FãüMFã£MDsÌÉ
    5ÙO4├LkqÊ×M0×(çÜm8§ªÜ CL=iþ¡4Ü m%-!ª!(ÑóÇ¡bè J)qI@
    )Ç┤RRÊ Ñóè┤ö┤└)GÁ%üÄ╬)├ÜfiGJ>ûÜ(═ :ûÉ(8p9╩;║M4ÜLËI¿( §ªSM4 ËÃ594÷5á×)äõÊÁ0Ë░iñSì0ðM4Ë®ªüiñqJxªÜ J
    ÊQ`
    JZJ,EPE JP!hóè┤öS┤QEĪè( ºH(─:ûø┼/¢░ßKÜh4
    :ûÉQGPÛlôL'4IÜÆÇÜc)IªÁ iªö˵ÿ
    &ÜM)ªÜ BiäËÅJi4iñ&ûÜh &ÖæN<ËiÇöåûâ@ Eåï QEÞ═óÆÉbècèJZii=®iÇö┤Qè,J))h ═.xªÊË░ Ü\±M┼.xñâN´M┼- 83IK@Å ┘where cd_aluno =1

    Esta certo  ? , pois geralmente arquivos de imagem são dessa forma:

    xFFD8FFE000104A46494600010101006000600000FFDB004300080606070605080707070909080A0C140D0C0B0B0C1912130F141D1A1F1E1D1A1C1C20242E2720222C231C1C2837292C30313434341F27393D38323C2E333432FFDB0043010909090C0B0C180D0D1832211C213232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232FFC000110800F0014003012200021101031101FFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D01020300041105122131410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00F0BCD3C37151669C0F18AE933101E68CD341A5CE2818B9E2A2CFEF2A4DDC545FC7498D1715B8A7EE1F5A801E282DCD520438B7CC29D9A8B39340342622C07E2AB29FDE1A7EFC8350A1F98D26EE08B148C6807D69AE78A77B80C9DB22BB5F8696C5AFE7B93F755367E2706B8898E40AF42F8647F737431F7581CFD6B9B117E56694CF483F76A03D6A663F29AAE6BCD361E0D2E6A3069D9A2E343F34E06A2CD2EEE28B812834B9A8437BD2EFED4C3526CD286A843D3838342044C5B14E045401867AD3B7509813034E06A10F4E56A62DC983528351034A1A9DC5D49C1A01A8B7538134D6A04A1A9E0D420D381A604C0D2838351679A7A9CD302506941A881A7034058F9741CD3B34DCF1C0A5AF534394407AD04F1480E3DE94D26C619A60FBD4E34C1F7A86344E0F1494678A285A0B642679A5A683F31A52734D80A4E01A647C934E6FBB4D8CF5A4D8D128383433669B9A46340588E439AF47F864B8B6BE6FF6D00FC8D79BB726BD57E1CC223D05E4EF24C73ED815CD8997B8CD2076AE7E5AAE5B9EB5239F96A135E79A8E0D416A674A4CE298C9037149BF8A8C9A8D9EA42E4371ABC16F3189B7165C671518D76D73FF002D07BE07F8D73135D19AF2593B33923E99E2A5003014AF7763DA8E029F2A72DCE906B9687F8987D56A45D6ACBFE7B63EAA4572CD1F248E07A532540AAA475C734AEC5F50A2FAB3B34D52CCF3F6A8BF16C7F3A9D2EE27FBB346D9F4706BCFCF30BBEFC329000F5A8E069669D6347DA58F5278FC68F6881E591B36A5B1E96AD8A70715E671EA17109CA4CEBDF8622AF8D6F53B57DAD3B6700ED6C375A1545D4CE5954D3D248EF83FBD48AF5C3C3E2BBD51FBC8A2907F7B6E3F9568DBF8B616C79D6ACB9FEE383FCEAF997739E797D78F4B9D506CD383565D8EA96FA82B3405BE5FBC19718AB4665405998003A92715671CA128BE56B52E06A786ACF17B063FD7C7FF007D8A7ADE407FE5B47FF7D8A2E81D39762F06A786AA6B7087A3A9FA30A984B9E71C7AD3B93CAD6E590D4ECD56120C6697CD18A77423E65FAD3CF4A578648D8ABA32B7A152293181CD7AACE7698C1D2968514B8E29584276A60FBD4F3F534D039A96344807147E3476A4279AB01A78634A391834D079A5A180A4F1C5226683D29178A9EA049CD358F3480D21E4D301A7AD7AEF8046DF0DC3EEEC7F5AF223CB0AF63F0526CF0DDA7B827F535C789B729AC363A294D67EA57AB61632DCB0C84C71576535CCF8BAE51744B885BAB05FE62B8E2AF248B6CD4D33515D4AC52E54001891807D0D5992558D0B31E00CD79F687E2AB6D3AC52D2447F909F9FD7249AD66F135A5F46F142EDBD948008ABA94DC5BEC69497B49A8F99B5FDA4EC4EDDA07D283752382091C8EC2B1619AAE47374AC5599EFFD569AD90C1A5C79CA922A75D3C0190DF85482418E2AB35F32DDAC1C6D61D7FCFD2AB963735BCD929B3C77A89EC4377AB1E66475A8A7B8F26267EA45269151BDF429C9A6707F798FC2ABB69647224E7E95A0B3996356FEF0CD359BDEB3714F535529196DA648338706892D2E256DCCC18FB9AB9F685690A0EA3AD296A4E28D399DF5454F26E05AF91B4140FBB8EB9E9508B7994E4C6C3DF19AD03205E738A72CBCFAD45849DBA1A7E180D1C572483CB28FD0D686A93916DB33F79803F4AC38EE4A74247D0D4AD7265501D89C74C9AE88CAC7995306E75FDA5C63E3A8A8F73633BF907A54C0A1A61894F7A993F33B92D068949EADCD588A5652307155CC241E0E6A44565355195899C133561B99CA8226907D18D48D7F74A71E693F5155219303A538C8A5B26B7DCE474A2F789D1196393864493D9941A8E58EC274D9369B6120FF006ADD33F9E2BC75357D4232365ECE31DB7E7F9D5C8FC55AC44062EB77FBCB9AD1687CE2BF467A5BE87E1A90379FE1FB2607BA06423E9835897BE08F0BCE4B4305D5B03D926C8FFC781AE6A2F1C6A698DEB13FAE41AB51F8EE6CFEF6CE323D9B154A524176C924F873A7C84F91A9CEBE81A356FEA2A849F0D2ED4930EA16EFE819596B5E1F1C5A120C9692A1F620D5F87C6FA4B9019A453EEB4D559F716BD51C54BE03D6E3CED8E09076DB281FCEB3E7F0AEB709C369F213FEC10DFCABD363F1168F3484ADF202DD9CE31F4A9E19F4EB87609750C8CC7380DCE6AFDBBEA168F63C6E5D2B5080E25B29D3FDE8C8AAACAC84865208F515F40A45B54618F03AE6B87F880B6E22813CB4F388672DB4671D073F9D6D0AAE5BA25D8F353D2957A52B8C520E954F7130CD0460D201CD2F43C8A1886F56AF6CF0D47E5685649E912FF2AF16853CCB844FEF3015EE7A6C621B28631D1500FD2B8B13B23586C5894E335C278CE62212BEAE07E87FFAD5DCCCDC1AF39F194D97543D4B13F4FF0039AE7A4AF245B38C6EA4D6968D93745B3DB159A4F35A9A2AE37B7A9AEBC4694D9D197ABE22275513E00AB692F15971BE2ACC7266BC94ECCFA97134BCEC01CD46515A6127F10AAE24A7092B452B92958BA24F7A8E5C4A855BA1A883D05F069DD02448B8450A3A0A466A8C9A3352E48762248CACCCF9EA69E5B9EB485A98C7350CBDF71B365D703AD2C676A8CD358E2937E3B54F41EE89F7D42B2BFDA9B93B71D2903F34E045529058B424E3AD2F986AA86E6A40D4D3158B11CE4D4E25E2A80201E0D4AB264552910E28BA252297CD0DC1AA824C5287C1AA527626C432782203910DF480FF00B680D5493C1170398EFA06FF007908AED21D474E9A4C0BA8C67A127AD6A45A64B7310960413211C346437FF5EBB6CD3D4F8E573CB9FC19AAAF286DA4FF0075C8FE62AAC9E19D5E3CE6C99B1FDC606BD5FEC33C24878244FF007969846C2411CF7A76683E479049A4EA109FDE58DC2FFDB33FD2AABC6F11F9D5D3FDE522BDA32BDBF9D432A06C850A3EAB9A13EE2B58F1B0C08FBC3F3ADCF0A5935D6B31360F9717CCD8FD05778FA75B4A732D9DB49EC631562C34EB3B325A0B686127AF96B8A6ECD58A8CAC682292001D4D79578C2F85DEAD7054FC88DE5AFD178FE79AF4CD4AF058E9971743AC6876FF00BC781FA9AF16D425677C13923A9F5ADA9AD0CFBB33A414D038A739E295456D7D49100C5369F4C3D334F4024B3FF8FC8B8FE31FCEBDCEDC6D8803DB8AF12D223F3356B54FEF4AA3F5AF6D43FBBCFAD70629EA91B4761B3B7CA6BCBFC59397BF11FF007413F9D7A5DCB62363DF15E57E2057975A92355CB7000FC2B3A1F1DCA92BAD0C33D6B674A1B6DF3EA49AA0FA75DA8E6DDC7E15A765134502AB82081D2B4C44D385933BB2B83F6D77D8D15738EB56237E066A929A9E32718AF359F4B1772D87F7AAF6F70EF79321CED5381EF4E14E000C9A13481C5B7A16C3E7BD457573E444189EA714C0687459400E0103914BAEA0D762CAB640C9E69C58639A8958014A483C50BB00D8E6F319BDA9C4E3BD34AA21F9140CF5A42C7D287E435DC0EE3920138E4E053739AB16F2AA24BB8F25702AB13CD0D1116DC9A6B442E6943738CD301E6ADDC4682DA0754192BCB6393D29A8AB5C2A4D46518F7200C69C1BD78A873EF4A1B2691A1386E69C1B155964C93CD3F7F34DE82B742D093346FC540AD9A0BF34D496C2B6A7A84D71A19056F74B5121E866B5033F8FAD5CD22EEC34D8A6755482138C01D335993C875A1BDFE509C818FD2A8C7AA88079573A65F46A38C887783F957AD7563E297333A3BDBEB3D5E030FDA63DA7BC720047E7588FE1488A3491EB770B81D1C237F85306A1E1A719B883693D7CCB52A7F9556963B1BABA5FECC508A0658A12063DE8BAEA0D35A2FC8DDB18211A6EEB9292F964AEF2B8271FD6B2B57B6BC9514E8F6F1923EF2BF19A8AF25B4D42C12D16F0054FEE3ED24FE3542DF45BB46FF47D6EF223D8655947E950DA5B171517AB6439F115A10F7BA446221F79D26EDEB5BAB0218564563B586466B13548B5C8C25B1D5CDDA4870C924617F5157AE6F069DA4A876C944DBCF734ADAA4852E5E5BA327C4533EA0B16916A0991DC17F4CF6FA7535CC5D7C39F1286245A43203FDC987F5AECFC2160F757D26A538CE0FC84FAE7AD77B818E956AA34F4D84E29687CEF71E0CF11419DFA45C9C7F706EFE559D3693A8DBF13585D47FEF44C3FA57D2CCA3B75A8D86E183D2AFDABEC438A3E6378D90E18153E8C315190306BE969AC2D671896DA1907FB718359971E16D12E33E6E976A49EE2303F955AAABAA138A3C3FC330F99E21B253DA40C7E839AF5E53F20F614E1E06D1219D67B6B67B7957A3452118FC0E45596D09C0C477F38FF007D15BFA0AE6AD1E769A2D348A5200411DAB9D9346B73AA4B7ACAC6473DCF18F6FCABA97D16F8676DDC0DECD115FE44FF002AA92693AAE0FEEED9FF00DD9083FAAD64A9C96A8774624B691E3EEE2B9CBC005DCA00E0362BB09B4ED500F9B4E90FFB9221FEB5CCDDE95AAACCEEFA65D852C4E444587E9594A94BA23D2CBA718C9B9333C1A992A2912484E258A58CFA3C6CBFCC539254C7DF5FCEB29539AE87BB4EA465B32C834E045313E6C7BD38AED26B37166D743C1C734ECD46B436723D293B328941A5DDC5301E2973421317762909EF4D539CD1F5A120149A616E695B38F6A6D315C5CE29779E94D3CD267D6849DB413B0EDD4E562185333C528C500ED61ECC09C8001A61624D069B435A0E2925A0FDE40A512735136050839A490A5268F4F78B5AB599BEC905ACD067E55690AB63F2A963BED662197D1598F7F2EE571FAE2BA68E2DA7E6C62B335BD463B584C71E0C84715EB25767C55D6C918775E216BE0D666CA48243F2B2B9071F95556B8B5D14F9724727CC3E6748C91F4A798E486D85E242F3DC31E50601A22D71D07EFF004BD413FDD8B77F2A4FCB61A4DE89145EEBC3D72DBA4FB38CF52F1953FCAA5169E1A96163018DA4C702395873F4AD21E25D294626B6BA5FFAE96C401F5245674C2DB53D4BCDB7891515704A8C5357EB74377DB5174DB5F290484B30E426F3CE2B0758BA3A96A0B6F09FDDAB6D18EE73C9AD8D72FC58D9F9287F78E368C761EB59BE1EB6C5DA5CC8B919E01F5A6A2EDE6C95257E6677FA45A0B3D3E1894636AF3F5ABE4D5582E83A8A9F706A49582F7D452C6986949A43400D3CD30D38D30D3131292968A64898A4DB4EA4A043760F4A0A0CFBD3A8A2C03766473CFD6AB4BA6D9CFF00EB6D6093FDF881FE62ADD2D161A6D6C6349E17D1A5396D36007D5014FE4455697C15A3C872B1CF19FF006276FEB9AE8A8A0D157AB1DA4FEF39197C076A4FEE6FAE93D370561FC855693C097207EE7538C8FF00A69011FC8D76F4A066A7D9C5F4368E3B111DA479E49E0BD613EE3D9CBFF6D0AE7F35AAAFE19D763FBDA76FFF00AE72AB7F857A7605285150E841F4378E6B885BB4CF26974AD4E2CEFD2EED71D71113FCAA9C9BA2E248A68FFDF8D863F315ECDB7EB4140C39A978681BC739A9F6A28F1813C2CB812293ECC2938AF609B4DB3B81FBEB4B793FDF894FF4AA5278574398E5B4BB707D5176FF002A9FAAC6DA3358E731EB13CB5464D4F71F3220F415E852782345933B619E33FEC4EDFD4D5497E1FD9303E55F5DC7E99DADFD297D5DA5B97FDA742525277563CFC039A7A26E2062BB193E1F483FD56A8A7FEBA418FE46AAB781B5788E629ED25FC597FA1ACDE1A4B63A56638797DA3987520914CADE9BC27AEA312D6224FF00AE52A9FE78AA3268BAAC24F99A65D0C7521377F2CD4FD5E76D8DE38BA32F8648CE6A13EF54B2C134670F04C9FEF46C3FA544080C06E03F1A97426B745AA9193D19D8A78DF5894ED68C283DF6E2AE28BCB98A4BD911E52A33B47249A608A1CF41F95598E731A6D57207A66BBB9FC8F8FB9930F8DEDE36D93DBF23B8C8AD2B7F1BE96BC88A719FF685569EC6D6762CF1AB13DC8AAE745B163FEA53F2A57885D76362EBC516DAB5A9B6B68DBE6F94EEEF4D448B4FB4677C2A28C9C552B4B086D1C18942F3553C5179B654B28640E368662BEA7B7E1FD6AE2AFD7444B77F75753264924D5B522EDD09E9D80AE9ECA01122A81D2B3346B131441D87CCD5D0C31F4E2B78C6DAB2252BBB2D8BD6C4802AF239E2AA40B81571456722E24B9A29A38A33523034D238A775A613CD026C6D14A692A890A4A5A280128A28A005A29296800A28A2980B4A0F6A4068CD003E969A3D6941A005A5A05145805029C06290502980FA5A414B480294628A00E28B00B8141008A294516402794ADC30047B8AAF269563367CCB3B76CFAC63FC2AD8A7014EDD81367CEEBE3CD507DF481BFE018AB09E3FBC1F7ECEDCFAE33FE35D249F0DAC8E764F2AFA700FF4AACFF0D63E765DB7FC09297B388F991949F101B23758AFE0E6AC278FADC8F9ECA4CFFB327F88A91FE1B4ABF76EE33F58C8FEB55DFE1CDE8FBB3C27F31FD297B388D3896D3C7362C31E4CE09EDC1A8B478E7D635996F995C5BE72BB875F4FE545A7C3EBA4994CF2A6C0790BDEBBAB0D2D2D61545518029C69A429492F87724B78028000E2AFC517B53A1B7C55E8A1E957264243628F03A55854E29E91E053F18AC99A588B1484548714C3400CED4D269E698C2810DA294D2531094668345300A29296800A5A4A280168A28A00296928A603852D341A5CF3400F14A29B9E6941A603A969B9A5A403C1A5069BDA95718A00753A9A29D9A620A5A4A5140C514F14D06968032BECF9ED486DFDABA6FECE507A52369E98E945C56398307B534C03D2B7E4B0EB815035963B5170B18DE40F4A7A43CF4AD2FB2107A53D6D80ED45C122AC5074E2AC88F03A54DB02F6A08A92910E290D3C8A61A4318D4C34F22986810D34C269E6A334210941A28A602514518A002928A298052D2502810B4B494503168A4A5A057168A4A2801E0D28A68A51CF5A603C1A514DA5A062D381E29A296810E069C29829C0E6801F4A29B9A5A007034B9A60A5CD303A8DB51B8A90B0A8D8E6A4D081D6A075E7A5597350B5022B32E298454CD5135211135466A46A89A8018C734C34E34D3458631A9869CD4D26958430D34F5A71A6D310DA28A29D804A29690D30128A28A4014A293345002D0292969882969296800A5A4A28B00ECD00E0D25283400E06969B9CD381C53016969334B9A005A70A666968B00FCD381A6034A4E28B00F068A6834A280B9D3934C638A42D4C66A458D6393513934F635131CD215C631A889A7B1A8CD0046C726A27A79EF51B1A006134D634E26986810C34D34E229A6801A7A534D3FBD349FCE980DA4A5A4A004A29692810868A5A4A0028C51450014B4829698052D2514AC02E28A28A6014B494B400BD29453734A39A007E694537BD2D301D45266968014714EA6D02810F14E14D5A51401D0134D269A5A9AC73525831A898D2B1C546C681084D46C69C4D4473DE900D3519EB4F34C34C061A6B71D29E4D309E2801879A6D38F5A69A00434C3D69E7AD349A006D252D21A62128A5A28013AD14628A004A2971494005140A2980B45252D200A5A28A0414B494B4C02947B52502818ECE29C39A6669474A043E969A28CD003A96901A2804381A703914CA053B01BA4D349A4CD349A82809F5A61A534D3400D3C735193934F63519A0069E2984E4D2B530D3B00869A4538D30D0034D34D3A9A6810869A4714A78A69A004A0D04D251600A4A5A4A2C014514500145141A004A0514502168A28A0614B4945310B4514503168EA68A2800A701482814C43A969BC52FBD03B0E14B9A68340A043A9690514750EA6C934C273413499A92809A631E2949A6B5201A69A694D318E6980D269A4D29A69A00426984D38F4A69340869A426969A68002699914E3CD369809486968340094514868B0051451DE81013CD19A292900514628A63168A4A5A041D69693DA9698094B4518A2C014A29296800CD2E78A6D2D3B00B9A5CF14DC52E78A402834EEF4DC52D00381A33494B408FFFD9,

    Muito obrigado.

    terça-feira, 17 de setembro de 2013 14:17
  • Desculpe, esqueci de um detalhe

    set @Cmd_Sql  =  'update cd_aluno set ds_foto =' + convert(varchar(max),@foto,2) + 'where cd_aluno =' +convert(varchar(50),@cd_aluno)

    Veja se dessa forma te ajuda.


    "A vida é um paraíso, mas os homens não o sabem e não se preocupam em sabê-lo." Fiodor Dostoievski

    • Sugerido como Resposta Manigold terça-feira, 17 de setembro de 2013 14:50
    • Marcado como Resposta Giovani Cr terça-feira, 24 de setembro de 2013 14:33
    terça-feira, 17 de setembro de 2013 14:36
  • Ai, sim .

    Vlw meu querido.

    abs.

    • Sugerido como Resposta Manigold terça-feira, 17 de setembro de 2013 15:12
    terça-feira, 17 de setembro de 2013 14:50
  • Opa, por nada.

    Se puder, marca como resposta.
    Valeu!


    "A vida é um paraíso, mas os homens não o sabem e não se preocupam em sabê-lo." Fiodor Dostoievski

    • Sugerido como Resposta Manigold terça-feira, 17 de setembro de 2013 15:12
    terça-feira, 17 de setembro de 2013 14:54
  • só uma pergunta o que significa o  ,2 ?

    obrigado novamente.

    terça-feira, 17 de setembro de 2013 14:57
  • só uma pergunta o que significa o  ,2 ?

    obrigado novamente.


    terça-feira, 17 de setembro de 2013 15:16
  • é o estilo de conversão que a função vai usar.

    Dá uma olhada AQUI.

    Abraço!


    "A vida é um paraíso, mas os homens não o sabem e não se preocupam em sabê-lo." Fiodor Dostoievski

    • Marcado como Resposta Giovani Cr terça-feira, 24 de setembro de 2013 14:33
    terça-feira, 17 de setembro de 2013 15:32