Jump to content

Select retorna-me a dobrar [RESOLVIDO]


Recommended Posts

Boas, mais uma vez venho tirar uma duvida XD

Eu tenho este codigo em Asp:

<asp:SqlDataSource ID="SqlDataSource16" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:cadastramentoGlobalConnectionString %>" 
                                SelectCommand=" SELECT   portas.idPorta,portas.idInterconect,portas.nomePorta,portas.descricao,interconect.idInterconect 
                                                FROM    portas,interconect,host
                                                WHERE   (portas.idInterconect=interconect.idInterconect) and (interconect.idHost=@idHost) and ((SELECT COUNT(*) AS Expr1
                                                FROM    cabos
                                                WHERE   (idporta = cabos.idPortaOrigem) or (idporta = cabos.idPortadestino)) = 0)">
                                    <asp:ControlParameter ControlID="DropDownList1" Name="idHost" 
                                        PropertyName="SelectedValue" Type="Int32" />

O select funciona mas so que retorna-me os resultados a dobrar ou seja eu tenho so 5 portas:


Uploaded with ImageShack.us

E ele na drop coloca-me isto:


Uploaded with ImageShack.us

Obrigado 😁

Ps: Eu sei que inventei um pouco no select ;D E que neste momento nao é a melhor maneira de estar representado (A)

Select Original feito por:edgarzigne

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.