Guest - fernando - Postado Abril 22, 2004 Denunciar Share Postado Abril 22, 2004 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)); Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 Corposemalma Postado Abril 22, 2004 Denunciar Share Postado Abril 22, 2004 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 orcn.Execute(Dont really know if this will solve you problem, because I use Dbisam, and dont know others Databases)Espero que tenha ajudado! Inté.... Citar Link para o comentário Compartilhar em outros sites More sharing options...
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
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.