If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Error 8577 "Failed to get .... in VB6

Dear All ,

I can successfully show the datareport 1st time when i run the program.but the next time I if I try to show the report,it gives error 8577!!
but if I close(END) the Program & rerun again, the error is gone,again for 1st time.

Re: Error 8577 "Failed to get .... in VB6

I typed at the end:
rs.close
con.close <<- operation not allowed when the connection is closed.!!! Error msg.

So am I correct in assuming that you put that after the line that sets con to nothing? That would be a problem.

It would appear that your routine is not using Con nor RS so not sure why they are even there. More likely it is the data environment or the report that is triggering the error. Would help a lot if you showed us what line the error is thrown on and tell us the actual error message rather than the number which we would have to look up.

Re: Error 8577 "Failed to get .... in VB6

Originally Posted by DataMiser

So am I correct in assuming that you put that after the line that sets con to nothing? That would be a problem.

It would appear that your routine is not using Con nor RS so not sure why they are even there. More likely it is the data environment or the report that is triggering the error. Would help a lot if you showed us what line the error is thrown on and tell us the actual error message rather than the number which we would have to look up.

At a quick glance I am seeing something here that may be trying to Export data from your report after the report has been closed and would therefore fail I would think.

Of course I do not see the rest of the code and maybe you have something in there that hides the report rather than closing it when the user is done with it but the modal call will halt the code just before the export and wait for the form to either be hidden or closed before the next line is allowed to execute and of course if it is closed then whatever data was there is not there any longer.

Re: Error 8577 "Failed to get .... in VB6

The above mentioned line is just writing a textfile in the Harddrive..so that user is not bothered to click on save report etc.
I have debugged the entire process going on...
When I run the program 1st Time,no error comes out.keeping the same form open if I make another sale, the error fires.
I can give you Teamviewer ID & Password..Please come into my Computer & Check.

Re: Error 8577 "Failed to get .... in VB6

Sorry but I will not log into your computer. I have also removed the id and password from your post as that could open you up to all sorts of problems. NEVER post that kind of info on a public forum area unless you actually want someone to hijack your system.

But like I said I do not use the data environment in VB, never liked that nor the data controls nor the report tools that comes with it. Instead I always use ADO code for data handling and always use active reports for reporting functions.

The Modal part is the only thing there that jumps out at me and like I said unless you are preventing the form from being closed elsewhere before it returns control the the code shown I would expect it to crash on that very line you pointed out.

If it were an issue of it not being closed properly then I would expect the error to occur before it gets there unless there is something related to the .ExportReport method that needs to be cleaned up after calling it. You may want to check into that.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.