1. Este site usa cookies. Ao continuar a usar este site está a concordar com o nosso uso de cookies. Saber Mais.

SQL Query

Discussão em 'Web Development' iniciada por goncalves, 3 de Outubro de 2008. (Respostas: 33; Visualizações: 1434)

  1. goncalves

    goncalves Power Member

    Alguem me pode ajudar a criar a consulta de tabela, com o Visual Studio, para MySQL??
    É que ja tentei tanta coisa, mas continua a dar-me erros.
     
    Última edição: 3 de Outubro de 2008
  2. RicardoMoreira

    RicardoMoreira Power Member

    Sem mostrares a query que estás a tentar correr como queres ajuda?
     
  3. goncalves

    goncalves Power Member

    o problema é mesmo construir a query...
     
  4. RicardoMoreira

    RicardoMoreira Power Member

    Mas o pessoal não pode adivinhar o que pretendes. Tens que explicar melhor o que pretendes, mostrar as tabelas, etc etc... :)
     
  5. goncalves

    goncalves Power Member

    ok. eu quero mostrar numa consulta, os campos da table1 que sao

    ID
    DATA
    POSTO
    ...
    ...
    ...

    Para isso ja criei a ligação a base dados SQL, so que nao consigo contruir o query..

    SELECT [ID], [DATA], FROM [table1]

    nao funciona
     
  6. RicardoMoreira

    RicardoMoreira Power Member

    Tenta:
    select id, data from table1

    Se não der, que erro te aparece?
     
  7. goncalves

    goncalves Power Member

    nao da erro, mas nao mostra nada... aparece tudo em branco
     
  8. RicardoMoreira

    RicardoMoreira Power Member

    Onde?

    Mostra o teu código...
     
  9. Mavors

    Mavors Power Member

    Tenta:

    SELECT * FROM table1

    vê se te retorna alguma coisa.
    Se não retornar é pq não há dados na tabela ou a conexão está mal feita.
     
  10. goncalves

    goncalves Power Member

    desculpa erro meu. ja aparece... so me flata configurar correctamente o web.config
    so nao percebo porque é que a sintaxe que eu usava com as BD ACCESS aqui nao funcionam
     
  11. RicardoMoreira

    RicardoMoreira Power Member

    Por exemplo, a seguir a "data" estavas a colocar uma virgula, isso era o suficiente para dar erro pois não especificavas mais nenhum campo da tabela a seguir.
     
  12. goncalves

    goncalves Power Member

    ok. entendido... agora é a porcaria do web.config k nao funciona lol
     
  13. RicardoMoreira

    RicardoMoreira Power Member

    Não percebi o que estás a fazer no web.config.
     
  14. goncalves

    goncalves Power Member

    depois de publicar o site (testes) da-me a pagina de erro do costume:

    Runtime Error

    [FONT=Arial, Helvetica, Geneva, SunSans-Regular, sans-serif]Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
    [/FONT]
    [FONT=Arial, Helvetica, Geneva, SunSans-Regular, sans-serif][/FONT]
    [FONT=Arial, Helvetica, Geneva, SunSans-Regular, sans-serif]
    [/FONT]
     
  15. RicardoMoreira

    RicardoMoreira Power Member


    Para veres o erro, no webconfig tens que colocar o <customErrors mode="Off"/>
     
  16. goncalves

    goncalves Power Member

    ja coloquei, mas pelos vistos... nada
    ja agora...
    Código:
    [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]<?[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]xml[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]version[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]1.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]encoding[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]utf-8[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] ?>
    <!--[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000] 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]-->
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]configuration[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]appSettings[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]/>
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]connectionStrings[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]*******ConnectionString[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]connectionString[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]server=*******;user id=******;database=******;Password=******;persist security info=True[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR]
    [/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]providerName[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]MySql.Data.MySqlClient[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    </[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]connectionStrings[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]system.web[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    <!--[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000] 
    Set compilation debug="true" to insert debugging 
    symbols into the compiled page. Because this 
    affects performance, set this value to true only 
    during development.
    Visual Basic options:
    Set strict="true" to disallow all data type conversions 
    where data loss can occur. 
    Set explicit="true" to force declaration of all variables.
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]-->
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]compilation[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]debug[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]strict[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]explicit[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]pages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]namespaces[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]clear[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Collections[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Collections.Specialized[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Configuration[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Text[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Text.RegularExpressions[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web.Caching[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web.SessionState[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web.Security[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web.Profile[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web.UI[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web.UI.WebControls[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web.UI.WebControls.WebParts[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]add[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]System.Web.UI.HtmlControls[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    </[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]namespaces[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    </[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]pages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    <!--
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]The <authentication> section enables configuration 
    of the security authentication mode used by 
    ASP.NET to identify an incoming user. 
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]-->
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]authentication[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]mode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Windows[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] />
    <!--
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]The <customErrors> section enables configuration 
    of what to do if/when an unhandled error occurs 
    during the execution of a request. Specifically, 
    it enables developers to configure html error pages 
    to be displayed in place of a error stack trace.
    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
    <error statusCode="403" redirect="NoAccess.htm" />
    <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]-->
    <[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]customErrors[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]mode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Off[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]/>
    </[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]system.web[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    </[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]configuration[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>
    [/COLOR][/SIZE][/COLOR][/SIZE]
     
    Última edição pelo moderador: 3 de Outubro de 2008
  17. RicardoMoreira

    RicardoMoreira Power Member

    É "customerrors mode" e não "customerrorsmode", leva espaço. E já agora, coloca também o debug a true.

    ah estás a programar dessa forma com connectionstrings...
     
  18. goncalves

    goncalves Power Member

    tem espaço... nao sei pq esta a comer os espaços quando passei para aqui

    <customErrors mode="Off"/>

    mas eu queria saber mesmo é qual o erro lol
     
  19. RicardoMoreira

    RicardoMoreira Power Member

    E não consegues ver o erro?
     
  20. goncalves

    goncalves Power Member

    nao. no meu computador, consigo testar a pagina e funciona.
    quando passo para o servidor, da-me erro.
    mas tenho quase a certeza que é a porcaria do web.config
     

Partilhar esta Página