Ir para conteúdo
Fórum Script Brasil
  • 0

Server Has Not Yet Been Opened


Guest - fernando -

Pergunta

Guest - fernando -

After to execute the last command occurs the following error: to "Server has not yet been opened". Already I looked at documentation, I downloaded packs of the crystal report and continues this error. Somebody knows as to correct?

CrReport := application1.NewReport;

cn := TADOConnection.Create(nil);

cn.Close;

cn.ConnectionString:= 'DSN=SEVEN; uid=SEVEN; pwd=SEVEN';

cn.Open;

comando := TADOCommand.Create(nil);

comando.Connection := cn;

comando.CommandText := 'SELECT * FROM BANCO';

CrReport.Database.AddADOCommand(OleVariant (cn.ConnectionObject), OleVariant(Comando.CommandObject));

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Althought I can fully understand English I dont understand why you used it here in a brazilian forum...

Dont know what these components are, so I guess that before you open the report (if it is conect with a database query component) you should make the query after the SELECT statement...

Like:

cn.Open or

cn.Execute

(Dont really know if this will solve you problem, because I use Dbisam, and dont know others Databases)

Espero que tenha ajudado! Inté.... biggrin.gif

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...