connection is in use by another statement
08/02/2006
0
Ola pessoal, estou migrando o sistema para SQL Server e quando vou abrir a Query abaixo, mostra o erro :
QyAux:=TQuery.Create(Self);
Try
QyAux.DataBaseName:=UVarsys.DataBaseSist.DataBaseName;
QyAux.Sql.Add(´SELECT COD_CLI_FOR, COD_TIPO_TITULO_PADRAO FROM CLIENTES_FORNECEDORES ´);
QyAux.Sql.Add(´WHERE COD_CLI_FOR = :COD_CLI_FOR´);
if (TBconhecimentosCod_Cliente_Consignatario.AsInteger>0) then
QyAux.ParamByName(´COD_CLI_FOR´).AsInteger:=TBconhecimentosCod_Cliente_Consignatario.AsInteger
Else
Begin
If TBConhecimentosIND_PAGAMENTO.asString=´O´ Then
QyAux.ParamByName(´COD_CLI_FOR´).asInteger:=TBConhecimentosCod_Cliente_Remetente.asInteger
Else
QyAux.ParamByName(´COD_CLI_FOR´).AsInteger:=TBConhecimentosCod_Cliente_Destinatario.AsInteger;
End;
if not QyAux.Prepared then
QyAux.Prepare;
QyAux.Open; //aqui mostra a mensagem
... //connection is in use by another statement
No firebird funciona perfeitamente
QyAux:=TQuery.Create(Self);
Try
QyAux.DataBaseName:=UVarsys.DataBaseSist.DataBaseName;
QyAux.Sql.Add(´SELECT COD_CLI_FOR, COD_TIPO_TITULO_PADRAO FROM CLIENTES_FORNECEDORES ´);
QyAux.Sql.Add(´WHERE COD_CLI_FOR = :COD_CLI_FOR´);
if (TBconhecimentosCod_Cliente_Consignatario.AsInteger>0) then
QyAux.ParamByName(´COD_CLI_FOR´).AsInteger:=TBconhecimentosCod_Cliente_Consignatario.AsInteger
Else
Begin
If TBConhecimentosIND_PAGAMENTO.asString=´O´ Then
QyAux.ParamByName(´COD_CLI_FOR´).asInteger:=TBConhecimentosCod_Cliente_Remetente.asInteger
Else
QyAux.ParamByName(´COD_CLI_FOR´).AsInteger:=TBConhecimentosCod_Cliente_Destinatario.AsInteger;
End;
if not QyAux.Prepared then
QyAux.Prepare;
QyAux.Open; //aqui mostra a mensagem
... //connection is in use by another statement
No firebird funciona perfeitamente
Craudio
Curtir tópico
+ 0
Responder
Posts
20/02/2006
Craudio
Nao funcionou , alguma outra dica ?
Obrigado pela ajuda Edilcimar.
Obrigado pela ajuda Edilcimar.
Responder
Clique aqui para fazer login e interagir na Comunidade :)