Guest - Sandra - Posted July 29, 2004 Report Share Posted July 29, 2004 Olá galera!Estou c/ problemas de novo no Crystal. Alguém me ajude por favor!Eu preciso imprimir um relatório de Cadastro Individual por código e nome do cliente.Estou usando o seguinte código:If otionEscolha(0).value=True then call Conectar (função p/ abrir o banco de dados) rst.open "Select form cliente where CodigoCliente = " & val(txt_S_Escolha.text) CrystalReport1.DataFiles(0) = App.Path & "\Cliente.mdb" CrystalReport1.ReportFileName= App.Path & "\rela2.rpt" CrystalReport1.Action = 1Aí dá o seguinte erro:Error 3709The application requested an operation on an object with a reference to a closedor invalid connection object.Se alguém puder me ajudar . . .ObrigadaSandra Quote Link to comment Share on other sites More sharing options...
0 Graymalkin Posted July 30, 2004 Report Share Posted July 30, 2004 Na seguinte linha...rst.open "Select form cliente where CodigoCliente = " & val(txt_S_Escolha.text)... falta especificar o objeto Connection (ADODB.Connection) que deve ter sido aberto na rotina "Conectar". É o segundo parâmetro do método Open do ADODB.Recordset.Abraços,Graymalkin Quote Link to comment Share on other sites More sharing options...
Question
Guest - Sandra -
Olá galera!
Estou c/ problemas de novo no Crystal. Alguém me ajude por favor!
Eu preciso imprimir um relatório de Cadastro Individual por código e nome do cliente.
Estou usando o seguinte código:
If otionEscolha(0).value=True then
call Conectar (função p/ abrir o banco de dados)
rst.open "Select form cliente where CodigoCliente = " & val(txt_S_Escolha.text)
CrystalReport1.DataFiles(0) = App.Path & "\Cliente.mdb"
CrystalReport1.ReportFileName= App.Path & "\rela2.rpt"
CrystalReport1.Action = 1
Aí dá o seguinte erro:
Error 3709
The application requested an operation on an object with a reference to a closed
or invalid connection object.
Se alguém puder me ajudar . . .
Obrigada
Sandra
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.