<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="http://www.friendship.com.br/Data/style/rss1.css" ?> <?xml-stylesheet type="text/xsl" href="http://www.friendship.com.br/Data/xsl/rss1.xsl" ?>
<!--RSS generated by mojoPortal Blog Module V 1.0 on Saturday, March 13, 2010-->
<rss version="2.0">
  <channel>
    <title>Últimas Novidades</title>
    <link>http://www.friendship.com.br/home.aspx</link>
    <description />
    <copyright>Copyright 2008 Friendship Solutions</copyright>
    <ttl>120</ttl>
    <managingEditor>leverson@nospamfriendship.com.br</managingEditor>
    <generator>mojoPortal Blog Module V 1.0</generator>
    <item>
      <title>AutoCompleteExtender não dispara eventos, não responde</title>
      <link>http://www.friendship.com.br/autocompleteextender-não-dispara-eventos-não-responde.aspx</link>
      <pubDate>Fri, 07 Nov 2008 13:31:57 GMT</pubDate>
      <guid>http://www.friendship.com.br/autocompleteextender-não-dispara-eventos-não-responde.aspx</guid>
      <comments>http://www.friendship.com.br/autocompleteextender-não-dispara-eventos-não-responde.aspx</comments>
      <description><![CDATA[<p>Pela segunda vez ao começar um novo projeto AspNet usando o extender AutoCompleteExtender para auto-sugerir valores num dropdown conforme se digita num textbox, eu tenho dificuldades em fazer o recurso funcionar.</p>
<p>Faço todas as chamadas, crio o webService, testo o webService, tudo OK mas,.. simplesmente na página ao digitar nada é sugerido.</p>
<p>Após apanhar muiiiiito, comparando minhas outras aplicações (onde o recurso está funcionando) com a nova, identifiquei sutis diferenças nas declarações dos webMethods e dos webServices e... sim eram esses os problemas. Para que eu não volte a esquecer, vou documentar aqui</p>
<p>Declaração do webService:</p>
<div style="border: 2px ridge white; margin: 0pt 10px 10px; padding: 10px; background-color: rgb(238, 238, 238); font-family: Courier New; font-size: 10pt;"><span style="color: black;">&lt;WebService(</span><span style="color: blue;">Namespace</span><span style="color: black;">:</span><span style="color: blue;">=</span><span style="color: rgb(128, 128, 128);">"http://tempuri.org/"</span><span style="color: black;">)&gt; _ &lt;WebServiceBinding(ConformsTo:</span><span style="color: blue;">=</span><span style="color: black;">WsiProfiles.BasicProfile1_1)&gt; _ &lt;</span><span style="color: black;">Microsoft.VisualBasic.CompilerServices.DesignerGenerated()&gt; _ &lt;Script.Services.ScriptService()&gt; _ </span><span style="color: blue;"><br />
Public Class </span><span style="color: black;">AutoComplete </span><span style="color: blue;"><br />
&#160;&#160; Inherits </span><span style="color: black;">System.Web.Services.WebService</span></div>
<p><br />
Declaração do webMethod (declaração é totalmente case-sensitive):</p>
<div style="border: 2px ridge white; margin: 0pt 10px 10px; padding: 10px; background-color: rgb(238, 238, 238); font-family: Courier New; font-size: 10pt;"><span style="color: black;">&lt;WebMethod()&gt; _ <br />
&lt;Script.Services.ScriptMethod()&gt; _ </span><span style="color: blue;"><br />
Public Function </span><span style="color: black;">GetTerceiros( _ </span><span style="color: blue;"> <br />
&#160;&#160; ByVal </span><span style="color: black;">prefixText </span><span style="color: blue;">As String</span><span style="color: black;">, </span><span style="color: blue;">_ <br />
&#160;&#160; ByVal </span><span style="color: black;">count </span><span style="color: blue;">As Integer</span><span style="color: black;">) </span><span style="color: blue;">As String</span><span style="color: black;">()</span></div>
<p><br />
Chamada no AspX:</p>
<div style="border: 2px ridge white; margin: 0pt 10px 10px; padding: 10px; background-color: rgb(238, 238, 238); font-family: Courier New; font-size: 10pt;"><span style="color: blue;">&lt;</span><span style="color: maroon;">ajaxToolkit:AutoCompleteExtender</span><span style="color: red;"> <br />
&#160;&#160; ID</span><span style="color: blue;">="TerceiroAutoComplete"</span><span style="color: red;"> <br />
&#160;&#160; runat</span><span style="color: blue;">="server"</span><span style="color: red;"> <br />
&#160;&#160; TargetControlID</span><span style="color: blue;">="TerceiroTextbox"</span><span style="color: red;"> <br />
&#160;&#160; ServicePath</span><span style="color: blue;">="~/Common/AutoComplete.asmx"</span><span style="color: red;"> <br />
&#160;&#160; ServiceMethod</span><span style="color: blue;">="GetTerceiros"</span><span style="color: red;"> <br />
&#160;&#160; MinimumPrefixLength</span><span style="color: blue;">="1"</span><span style="color: red;"> <br />
&#160;&#160; CompletionInterval</span><span style="color: blue;">="1000"</span><span style="color: red;"> <br />
&#160;&#160; CompletionSetCount</span><span style="color: blue;">="20"</span><span style="color: red;"> <br />
&#160;&#160; EnableCaching</span><span style="color: blue;">="true"</span><span style="color: red;"> <br />
&#160;&#160; Enabled</span><span style="color: blue;">="true"</span><span style="color: red;"> </span><span style="color: blue;"><br />
&#160;&#160; /&gt;</span></div>
<p>Ah sim, mais uma coisa, no AspX os objetos devem estar dentro de um UpdatePanel, naturalmente.</p>
<div style="color: whitesmoke;">AJAX: AutoCompleteExtender not firing, not responding</div><br /><a href='http://www.friendship.com.br'>Leverson</a>]]></description>
    </item>
    <item>
      <title>Como provocar um erro SQL Server</title>
      <link>http://www.friendship.com.br/como-provocar-um-erro-sql-server.aspx</link>
      <pubDate>Tue, 28 Oct 2008 19:45:20 GMT</pubDate>
      <guid>http://www.friendship.com.br/como-provocar-um-erro-sql-server.aspx</guid>
      <comments>http://www.friendship.com.br/como-provocar-um-erro-sql-server.aspx</comments>
      <description><![CDATA[<p>"Como provocar um erro SQL Server ?" Essa foi a pergunta do meu amigo. Achei válido catalogar aqui pois além de não precisar me lembrar, pode ser uma dúvida de outros. Eis a resposta:</p>
<div style="border: 1px solid gray; margin: 10px; padding: 10px; background-color: silver;"><font color="darkgreen" style="font-family: courier new,monospace;">-- DENTRO DE UMA TRIGGER POR EXEMPLO<br />
</font><font color="blue" style="font-family: courier new,monospace;">if&#160;</font><font color="black" style="font-family: courier new,monospace;">AlgumCoisa&#160;</font><font color="blue" style="font-family: courier new,monospace;">=&#160;</font><font color="black" style="font-family: courier new,monospace;">SeiLaQue&#160;</font><font color="blue" style="font-family: courier new,monospace;">begin<br />
&#160;&#160;&#160;raiserror&#160;</font><font color="maroon" style="font-family: courier new,monospace;">30005&#160;</font><font color="#808080" style="font-family: courier new,monospace;">'Faz&#160;<wbr></wbr>direito&#160;que&#160;funciona.'<br />
</font><font color="blue" style="font-family: courier new,monospace;">end<br />
<br />
</font><font color="darkgreen" style="font-family: courier new,monospace;">--&#160;OU&#160;ALGO&#160;ASSIM&#160;NUMA&#160;PROCEDURE<br />
</font><font color="blue" style="font-family: courier new,monospace;">if&#160;</font><font color="black" style="font-family: courier new,monospace;">AlgumCoisa&#160;</font><font color="blue" style="font-family: courier new,monospace;">=&#160;</font><font color="black" style="font-family: courier new,monospace;">SeiLaQue&#160;</font><font color="blue" style="font-family: courier new,monospace;">begin<br />
&#160;&#160;&#160;RAISERROR&#160;</font><font color="black" style="font-family: courier new,monospace;">(</font><font color="#808080" style="font-family: courier new,monospace;">'Faz&#160;direito&#160;<wbr></wbr>que&#160;funciona.'</font><font color="black" style="font-family: courier new,monospace;">,</font><font color="maroon" style="font-family: courier new,monospace;"> 16</font><font color="black" style="font-family: courier new,monospace;">,</font><font color="maroon" style="font-family: courier new,monospace;"> 1</font><font color="black" style="font-family: courier new,monospace;">)<br />
</font><font color="blue" style="font-family: courier new,monospace;">end</font></div><br /><a href='http://www.friendship.com.br'>Leverson</a>]]></description>
    </item>
    <item>
      <title>fsCash - Capítulo 01: Introdução</title>
      <link>http://www.friendship.com.br/fscash-capítulo-01-introdução.aspx</link>
      <pubDate>Mon, 10 Dec 2007 19:02:26 GMT</pubDate>
      <guid>http://www.friendship.com.br/fscash-capítulo-01-introdução.aspx</guid>
      <comments>http://www.friendship.com.br/fscash-capítulo-01-introdução.aspx</comments>
      <description><![CDATA[<table width="100%">
    <tbody>
        <tr>
            <td style="vertical-align: top; width: 1%;"><img width="100" height="52" src="http://www.friendship.com.br/Portals/1/Blog/Files/32/56/SADE.JPG" alt="Clipper" /></td>
            <td style="vertical-align: top; width: 99%;" colspan="2">Eu sempre fui um cara muito chato com relação às minhas coisas, gosto de ter tudo muito catalogado e organizado (minha mulher que o diga). Com minhas finanças (quem lê pensa que é muita) não poderia ser diferente, por isso sempre tive um programinha para isso.</td>
        </tr>
        <tr>
            <td style="vertical-align: top; width: 99%;" colspan="2">Na época que trabalhava com <a href="http://pt.wikipedia.org/wiki/Clipper" target="_blank">Clipper</a> eu&#160;fiz um&#160;aplicativo com base em <a href="http://pt.wikipedia.org/wiki/Dbf" target="_blank">DBFs</a>, telinhas bem pobres mas que dava conta do recado. Quando comecei a trabalhar com vb6 migrei a base para o <a href="http://pt.wikipedia.org/wiki/Microsoft_Access" target="_blank">Microsoft Access</a> e fiz, junto com o Luciano Nascimento, um novo programa. Foi uma festa, tinha interface gráfica, botõeszihos coloridos, navegação em grid e era <a href="http://pt.wikipedia.org/wiki/Multi-tarefa" target="_blank">multi-tarefa</a>... cara, pros mais novinhos que já nasceram em berço <a href="http://pt.wikipedia.org/wiki/Microsoft_Windows" target="_blank">Windows</a> e não viveram os gloriosos dias do <a href="http://pt.wikipedia.org/wiki/MS-DOS" target="_blank">DOS</a>, a idéia de poder visualizar&#160;a lista de&#160;clientes e a lista de contas a pagar ao mesmo tempo&#160;era algo perto de sobre-natural. Utilizei-o até o advento do <a href="http://pt.wikipedia.org/wiki/.net" target="_blank">Microsoft .Net</a> quando novamente re-fiz, desta vez com a ajuda do William da Motta,&#160;meu pequeno Fluxo de Caixa, agora utilizando base de dados <a href="http://pt.wikipedia.org/wiki/Msde" target="_blank">MSDE</a> e telinhas ainda mais agradáveis. Os maiores avanços foram internos com o uso de herança nas classes, geração de telas e relatórios&#160;em tempo de execução e procedures direto na base de dados, etc.</td>
            <td style="vertical-align: top; width: 1%;"><img width="100" height="74" src="http://www.friendship.com.br/Portals/1/Blog/Files/32/56/fc.jpg" alt="vb6" /></td>
        </tr>
        <tr>
            <td style="vertical-align: top; width: 1%;"><img width="100" height="71" src="http://www.friendship.com.br/Portals/1/Blog/Files/32/56/fcLite.JPG" alt="vb.Net" /></td>
            <td style="vertical-align: top; width: 99%;" colspan="2">Bom galera, há pelo menos 4 anos eu estou querendo criar um novo aplicativo para administrar minhas finanças pessoais e não consigo. Falta de tempo, ausência de tempo e tempo escasso tem sido os motivos principais. Por isso que, seguindo a dica do Joseph (que logo irá inaugurar uma série de posts aqui no blog), resolvi iniciar essa série. Desta forma, havendo o comprometimento com o blog eu devo me esforçar mais para conseguir concluí-lo e terei não apenas o programa para meu uso pessoal como todo o desenvolvimento do mesmo devidamente documentado.<br />
            A idéia é simples; vamos explorar a criação de um simples e eficaz controle financeiro desde a concepção da base de dados até a geração do setup. A cada post vamos exemplificando e explicando, deixando sempre disponível os fontes abertos e atualizados. Com isso, os mais experientes poderão colaborar com idéias e sugestões e os menos experientes poderão se beneficiar desse passo-a-passo.</td>
        </tr>
        <tr>
            <td colspan="3">Fiquem atentos ao próximo post para o início&#160;dessa empreitada.</td>
        </tr>
    </tbody>
</table><br /><a href='http://www.friendship.com.br'>Admin</a>]]></description>
    </item>
    <item>
      <title>Definindo nova localização para os diretórios de Sistema</title>
      <link>http://www.friendship.com.br/definindo-nova-localização-para-os-diretórios-de-sistema.aspx</link>
      <pubDate>Mon, 10 Dec 2007 16:40:10 GMT</pubDate>
      <guid>http://www.friendship.com.br/definindo-nova-localização-para-os-diretórios-de-sistema.aspx</guid>
      <comments>http://www.friendship.com.br/definindo-nova-localização-para-os-diretórios-de-sistema.aspx</comments>
      <description><![CDATA[<p>Se voce, como eu, cotuma particionar seu HD em pelo menos <strong>dois volumes</strong> deixando os <strong>programas instalados</strong> num <strong>drive C:</strong> com o mínimo possível de espaço e o resto num <strong>drive D:</strong> para os <strong>dados</strong>, voce já teve a necessidade de a pasta <strong>'Meus Documentos'</strong> ser localizada no drive D: também para facilitar as coisas.<br />
Bem, para alguma dessas pastas isso é bastante intuitivo, basta clicar com o <strong>botão direito</strong> na pasta e <strong>escolher a localização desejada</strong>. Porém eu vou além, eu tenho a necessidade de ter <strong>plena certeza</strong> de que meu drive C: possa ser formatado a qualquer momento <strong>sem me preocupar</strong> com dado algum que possa nele existir.&#160;E isso&#160;significa não apenas a pasta <strong>Meus Documentos</strong>, mas também <strong>Meus Favoritos</strong> por exemplo, entre outras. Fora <strong>Minhas Músicas</strong>, <strong>Vídeos</strong>, <strong>Imagens</strong> que no <strong>Windows Vista</strong> não mais ficam dentro de Meus Documentos.</p>
<table width="100%" cellspacing="2" cellpadding="2" border="0">
    <tbody>
        <tr>
            <td width="1%"><a href="./Data/Sites/1/Media/Common/WinXP%20-%20Localizacao%20de%20Diretorios.JPG" target="_blank"><img width="150" height="109" alt="WinXP" src="./Data/Sites/1/Media/Common/WinXP%20-%20Localizacao%20de%20Diretorios.JPG" /></a></td>
            <td width="100%" valign="top" colspan="2">Bom, no <strong>WindowsXP</strong> a chave de registro que possui essas configurações é essa logo abaixo, bastando apenas preencher seus valores com as localizações desejadas.<br />
            <strong><font face="Courier New" color="#333399">HKCU\ Software\ Microsoft\ Windows\ CurrentVersion\ Explorer\ User Shell Folders\ Favorites</font></strong></td>
        </tr>
        <tr>
            <td width="100%" valign="top" colspan="2">Já no <strong>WindowsVista</strong>, a chave é essa abaixo. Reparem que no Vista podemos também definir a localização das pasta <strong>Public</strong> muito útil para compartilhamentos pois o próprio sistema operacional disponibiliza atalhos para ela de dentro dos diversos programas.<br />
            <strong><font face="Courier New" color="#333399">HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList</font></strong></td>
            <td width="1%"><a href="./Data/Sites/1/Media/Common/WinVista%20-%20Localizacao%20de%20Diretorios.JPG" target="_blank"><img width="150" height="101" alt="WinVista" src="./Data/Sites/1/Media/Common/WinVista%20-%20Localizacao%20de%20Diretorios.JPG" /></a></td>
        </tr>
    </tbody>
</table><br /><a href='http://www.friendship.com.br'>Admin</a>]]></description>
    </item>
    <item>
      <title>Desbloquear anexos no Outlook</title>
      <link>http://www.friendship.com.br/desbloquear-anexos-no-outlook.aspx</link>
      <pubDate>Mon, 10 Dec 2007 16:11:26 GMT</pubDate>
      <guid>http://www.friendship.com.br/desbloquear-anexos-no-outlook.aspx</guid>
      <comments>http://www.friendship.com.br/desbloquear-anexos-no-outlook.aspx</comments>
      <description><![CDATA[<p>Para desbloquear arquivos <strong>.exe</strong>, <strong>.mdb</strong>, <strong>.bat</strong>, etc... que vêm anexo às mensagens do Microsoft OutLook (XP/2003) faça o seguinte:</p>
<ul>
    <li>Adicione um novo valor da seqüência à chave <strong>[HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security]</strong>.</li>
    <li>Dê o nome de <strong>Level1Remove</strong> a novo valor.</li>
    <li>Adicione as extensões que você quer que sejam desbloqueadas pelo OutLook separadas por ; (ponto e vírgula), exemplo: exe;bat;mdb</li>
</ul>
<p><a target="_blank" href="./Data/Sites/1/Media/Common/Desbloquear%20Anexo%20do%20Outlook.JPG"><img width="150" height="94" alt="" src="./Data/Sites/1/Media/Common/Desbloquear%20Anexo%20do%20Outlook.JPG" /></a></p><br /><a href='http://www.friendship.com.br'>Admin</a>]]></description>
    </item>
    <item>
      <title>Nova Versão 1.00b</title>
      <link>http://www.friendship.com.br/nova-versão-100b.aspx</link>
      <pubDate>Thu, 18 Oct 2007 01:25:22 GMT</pubDate>
      <guid>http://www.friendship.com.br/nova-versão-100b.aspx</guid>
      <comments>http://www.friendship.com.br/nova-versão-100b.aspx</comments>
      <description><![CDATA[<p>Já esta <strong>disponível</strong> a nova versão do <strong>SmartMenu (1.00b)</strong>.</p>
<p><strong>Novidades da versão:</strong></p>
<ul>
    <li>Correção na chamada dos programas, pois ao clicar várias vezes rapidamente no mesmo atalho causava erro;</li>
    <li>Ajuste no tamanho da barra de busca, podendo agora realizar buscar na internet pelo <strong>Google</strong>, abrindo automaticamente o seu browser.</li>
</ul>
<p>Baixe agora mesmo esta nova versão e deixe um comentário ou uma dica.</p>
<p>A <strong>Equipe Friendship</strong>, agradece sua atenção e estamos trabalhando para facilitar a sua vida.</p>
<p>&#160;</p><br /><a href='http://www.friendship.com.br'>Admin</a>]]></description>
    </item>
    <item>
      <title>Bíblia On Line</title>
      <link>http://www.friendship.com.br/bíblia-on-line.aspx</link>
      <pubDate>Sat, 13 Oct 2007 17:44:06 GMT</pubDate>
      <guid>http://www.friendship.com.br/bíblia-on-line.aspx</guid>
      <comments>http://www.friendship.com.br/bíblia-on-line.aspx</comments>
      <description><![CDATA[<p>Olá irmãos e amigos, disponibilizamos em nosso site a primeira versão totalmente on-line do Minha Biblia, clique <a href="http://www.friendship.com.br/LinkClick.aspx?link=70&amp;tabid=70">aqui</a> para acessar. Poderemos <strong>consultar</strong> a palavra de Deus de <strong>qualquer lugar</strong> usando apenas o browser. Estamos trabalhando para tornar a ferramenta&#160;ainda melhor, postem suas sugestões e criticas aqui em nosso blog.</p>
<p>Fiquem na paz do Senhor.</p>
<p>&#160;</p><br /><a href='http://www.friendship.com.br'>Admin</a>]]></description>
    </item>
    <item>
      <title>Alterar idioma (language) do SQL Server</title>
      <link>http://www.friendship.com.br/alterar-idioma-language-do-sql-server.aspx</link>
      <pubDate>Mon, 08 Oct 2007 10:30:47 GMT</pubDate>
      <guid>http://www.friendship.com.br/alterar-idioma-language-do-sql-server.aspx</guid>
      <comments>http://www.friendship.com.br/alterar-idioma-language-do-sql-server.aspx</comments>
      <description><![CDATA[<p><span class="Normal" id="dnn_ctr443_MainView_ViewEntry_lblEntry">Muitas vezes me questionam sobre como proceder com consultas envolvendo campos data. Bem, em linhas gerais podemos dizer que, fazendo a consulta utilizando o padrão ‘yyyy-mm-dd’ ou ‘yyyymmdd’ ( sendo [y]ear, [m]onth, [d]ay, respectivamente ) não teremos problemas.
<div style="border: 1px solid silver; font-family: 'Courier New'; background-color: lightgrey;"><font size="2"><font color="#0000ff">SELECT&#160;</font> <br />
&#160;&#160;Codigo, Descricao, DataCadastro <br />
<font color="#0000ff">FROM&#160;</font>Clientes <br />
<font color="#0000ff">WHERE&#160;</font> <br />
&#160;&#160;DataCadastro&#160;=&#160;<font color="#ff0000">'2007-10-07'</font> </font></div>
<br />
<br />
Bem, não é bem assim, para que a sintaxe acima funcione, o servidor (e usuário logado) precisa estar utilizando o idioma inglês. Agora, e se o servidor tiver sido instalado com idioma em português, ou ainda, uma aplicação que antes funcionava pois estava em um servidor cujo idioma era inglês e fora restaurado num servidor cujo idioma seja português. Para esses casos precisaríamos de uma instrução para alterar o idioma, o script abaixo faria o serviço.
<div style="border: 1px solid silver; font-family: 'Courier New'; background-color: lightgrey;"><font size="2"><font color="#008000">-- EXIBIR A ATUAL CONFIGURACAO DE IDIOMA</font> <br />
<font color="#0000ff">SELECT&#160;</font> <font color="#ff00ff">@@language</font>,&#160; <font color="#ff00ff">@@langid&#160;</font> <br />
<br />
<font color="#008000">-- DEFINIR O IDIOMA DEFAULT PARA O SERVIDOR</font> <br />
<font color="#0000ff">EXEC&#160;</font> <font color="#800000">sp_configure&#160;</font> <font color="#ff0000">'default language'</font>, 0 <br />
<br />
<font color="#008000">-- DEFINIR O IDIOMA PARA CADA LOGIN DO SERVIDOR</font> <br />
<font color="#0000ff">EXEC&#160;</font> <font color="#800000">sp_defaultlanguage&#160;</font> <font color="#ff0000">'sa'</font>,&#160; <font color="#ff0000">'us_english'</font>&#160;<br />
<font color="#008000">-- EXEC sp_defaultlanguage 'NomeUsuario', 'us_english' <br />
-- EXEC sp_defaultlanguage 'Maquina\Usuario', 'us_english' </font><br />
<br />
<font color="#008000">-- COMANDO PARA RECONFIGURAR ALTERACOES FEITAS</font> <br />
<font color="#0000ff">RECONFIGURE</font> <br />
<br />
<font color="#008000">-- APOS ISSO SERA PRECISO DAR UM STOP e START NO SQL SERVER</font> </font></div>
<br />
até a próxima.</span></p><br /><a href='http://www.friendship.com.br'>Admin</a>]]></description>
    </item>
    <item>
      <title>Smart Menu: Novo Membro da Família</title>
      <link>http://www.friendship.com.br/smart-menu-novo-membro-da-família.aspx</link>
      <pubDate>Sat, 29 Sep 2007 02:14:47 GMT</pubDate>
      <guid>http://www.friendship.com.br/smart-menu-novo-membro-da-família.aspx</guid>
      <comments>http://www.friendship.com.br/smart-menu-novo-membro-da-família.aspx</comments>
      <description><![CDATA[<p><span id="dnn_ctr443_MainView_ViewEntry_lblEntry" class="Normal">
<div style="margin: 0cm 0cm 10pt;">A <strong>Equipe</strong> <strong>Friendship</strong> tem novamente o prazer de apresentar à vocês o mais novo membro da família, <strong>Smart Menu</strong>, esta nova ferramenta irá revolucionar a sua forma de acessar programas.</div>
<div style="margin: 0cm 0cm 10pt;">Basta configurar o <strong>Smart Menu</strong> com os <strong>seus programas</strong> mais utilizados, <strong>separados por grupo</strong> e com a possibilidade de ser uma <strong>barra superior</strong> que diminuirá automaticamente o tamanho, quando perder o foco, para não poluir sua tela ou atrapalhar o seu trabalho. Ele pode ser utilizado também como um <strong>Ícone de Bandeja</strong>, localizado ao lado do seu relógio na Barra do Menu Iniciar, clicando com o botão direito do Mouse sobre a <strong>“estrelinha”</strong>, você terá acesso a todos os seus programas de <strong>forma clara e limpa</strong>.</div>
<div style="margin: 0cm 0cm 10pt;">O <strong>Smart Menu</strong> foi criado para ter <strong>o seu jeito</strong>, possuir <strong>o seu estilo</strong>, facilitando e agilizando seu trabalho, por isso, se você tiver dicas, sugestões ou reclamações, mande para nós.</div>
<div style="margin: 0cm 0cm 10pt;">Estamos aguardando o seu feedback.</div>
</span></p><br /><a href='http://www.friendship.com.br'>Admin</a>]]></description>
    </item>
    <item>
      <title>Transformar array de valores em tabela</title>
      <link>http://www.friendship.com.br/transformar-array-de-valores-em-tabela.aspx</link>
      <pubDate>Wed, 26 Sep 2007 23:36:28 GMT</pubDate>
      <guid>http://www.friendship.com.br/transformar-array-de-valores-em-tabela.aspx</guid>
      <comments>http://www.friendship.com.br/transformar-array-de-valores-em-tabela.aspx</comments>
      <description><![CDATA[<p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal"><span style="font-size: 12pt;"><font face="Calibri">Muitas vezes, me deparo com o problema de ter uma <strong style="">lista de valores</strong> (contida numa string, por exemplo) e querer utilizá-la como <strong style="">registros de uma tabela</strong>, talvez para fazer join com alguma outra tabela ou coisa assim. Se essa necessidade ocorrer dentro de uma </font></span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">PROC</span><span style="font-size: 12pt;"><font face="Calibri">, poderíamos criar uma <strong style="">tabela temporária</strong>, abastecê-la com os registros desejados, fazer uso da forma que desejarmos e depois apagá-la. Já numa </font></span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">VIEW</span><font face="Calibri"><span style="font-size: 12pt;"> não temos como criar objetos, apenas os consultamos, ou numa rotina dentro de um programa, as limitações seriam semelhantes.</span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><o:p></o:p></span></font></p>
<p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal"><font size="3" face="Calibri">Foi pensando nisso que eu dei uma estudada e cheguei no <strong style="">script abaixo</strong>. Ele cria na base de dados uma </font><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">FUNCTION</span><font size="3" face="Calibri"> que <strong style="">recebe</strong> por parâmetro uma <strong style="">string contendo a lista de valores</strong> e outro contendo o <strong style="">caractere usado como separador</strong> na lista e <strong style="">retorna uma tabela</strong> com uma coluna e os diversos valores em forma de registros. Vamos ao script: </font></p>
<table width="100%" cellspacing="1" cellpadding="0" border="0" style="background: rgb(191, 191, 191) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 100%;" class="MsoNormalTable">
    <tbody>
        <tr style="">
            <td style="border: medium none rgb(240, 240, 240); padding: 0.75pt; background-color: transparent;">
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">CREATE</span><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> <span style="color: blue;">FUNCTION</span> dbo<span style="color: gray;">.</span>GetTableFromString<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; color: gray; font-family: &quot;Courier New&quot;;">(<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160; </span>@Valores <span style="color: blue;">VarChar</span><span style="color: gray;">(</span>4000<span style="color: gray;">),<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160; </span>@Separador <span style="color: blue;">Char</span><span style="color: gray;">(</span>1<span style="color: gray;">)<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;</span><span style="color: gray;">)<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">RETURNS</span><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> @Retorno <span style="color: blue;">TABLE</span><span style="color: gray;">(</span> Valor <span style="color: blue;">VarChar</span><span style="color: gray;">(</span>256<span style="color: gray;">)</span> <span style="color: gray;">)<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">BEGIN<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;"><o:p>&#160;</o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160; </span><span style="color: blue;">DECLARE</span> @PosIni <span style="color: blue;">INT</span><span style="color: gray;">,</span> @PosFim <span style="color: blue;">INT<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160; </span><span style="color: blue;">SELECT</span> <o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160; </span>@PosIni <span style="color: gray;">=</span> 1<span style="color: gray;">,</span> <o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160; </span>@PosFim <span style="color: gray;">=</span> <span style="color: fuchsia;">CharIndex</span><span style="color: gray;">(</span>@Separador<span style="color: gray;">,</span> @Valores<span style="color: gray;">)<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; color: gray; font-family: &quot;Courier New&quot;;"><o:p>&#160;</o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160; </span><span style="color: blue;">WHILE</span> @PosIni <span style="color: gray;">&lt;</span> <span style="color: fuchsia;">Len</span><span style="color: gray;">(</span>@Valores<span style="color: gray;">)</span> <span style="color: gray;">+</span> 1 <span style="color: blue;">BEGIN<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">IF</span> @PosFim <span style="color: gray;">=</span> 0 <span style="color: blue;">BEGIN<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="">&#160;&#160;</span><span style="color: blue;">SET</span> @PosFim <span style="color: gray;">=</span> <span style="color: fuchsia;">Len</span><span style="color: gray;">(</span>@Valores<span style="color: gray;">)</span> <span style="color: gray;">+</span> 1<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">END<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;"><o:p>&#160;</o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">INSERT</span> <span style="color: blue;">INTO</span> @Retorno <span style="color: gray;">(</span>Valor<span style="color: gray;">)</span> <o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">VALUES</span><span style="color: gray;">(</span> <span style="color: fuchsia;">SUBSTRING</span><span style="color: gray;">(</span>@Valores<span style="color: gray;">,</span> @PosIni<span style="color: gray;">,</span> @PosFim <span style="color: gray;">-</span> @PosIni<span style="color: gray;">)</span> <span style="color: gray;">)<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; color: gray; font-family: &quot;Courier New&quot;;"><o:p>&#160;</o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">SET</span> @PosIni <span style="color: gray;">=</span> @PosFim <span style="color: gray;">+</span> 1<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">SET</span> @PosFim <span style="color: gray;">=</span> <span style="color: fuchsia;">CharIndex</span><span style="color: gray;">(</span>@Separador<span style="color: gray;">,</span> @Valores<span style="color: gray;">,</span> @PosIni<span style="color: gray;">)<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160; </span></span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">END<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;"><o:p>&#160;</o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&#160;&#160; </span><span style="color: blue;">RETURN<o:p></o:p></span></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">END<o:p></o:p></span></p>
            </td>
        </tr>
    </tbody>
</table>
<p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal">&#160;</p>
<p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal"><font size="3" face="Calibri">Supondo que temos a seguinte lista: </font><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;;">'azul|verde|branco|preto'</span><font size="3" face="Calibri">, podemos ver que os valores são separados pelo caractere: </font><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;;">'|' </span><font size="3" face="Calibri">ou seja, faríamos a chamada da função da seguinte forma:&#160; </font></p>
<table width="100%" cellspacing="1" cellpadding="0" border="0" style="background: rgb(191, 191, 191) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 100%;" class="MsoNormalTable">
    <tbody>
        <tr style="">
            <td style="border: medium none rgb(240, 240, 240); padding: 0.75pt; background-color: transparent;">
            <p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">&#160;</span><span lang="EN-US" style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;">SELECT</span><span lang="EN-US" style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> <span style="color: gray;">*</span> <span style="color: blue;">FROM</span> dbo<span style="color: gray;">.</span>GetTableFromString<span style="color: gray;">(</span><span style="color: red;">'azul|verde|branco|preto'</span><span style="color: gray;">,</span> <span style="color: red;">'|'</span><span style="color: gray;">)</span></span><span lang="EN-US" style="font-size: 9pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><o:p></o:p></span></p>
            </td>
        </tr>
    </tbody>
</table>
<p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal">&#160;</p>
<p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal"><font size="3" face="Calibri">E o retorno seria: </font></p>
<table width="100%" cellspacing="1" cellpadding="0" border="0" style="background: rgb(217, 217, 217) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 100%;" class="MsoNormalTable">
    <tbody>
        <tr style="">
            <td style="border: medium none rgb(240, 240, 240); padding: 0.75pt; background-color: transparent;">
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">Valor<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">-------------------<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">azul<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">verde<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">branco<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">preto<o:p></o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;"><o:p>&#160;</o:p></span></p>
            <p style="margin: 0cm 0cm 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">(6 row(s) affected)</span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><o:p></o:p></span></p>
            </td>
        </tr>
    </tbody>
</table>
<p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal">&#160;</p>
<p style="margin: 0cm 0cm 10pt; line-height: normal;" class="MsoNormal"><font size="3"><font face="Calibri">po-po-por hoje é só pe-pe-pessoal... até a próxima</font></font></p><br /><a href='http://www.friendship.com.br'>Admin</a>]]></description>
    </item>
  </channel>
</rss>