Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

method ~ of object ~ failed

Status
Not open for further replies.

ollivere

IS-IT--Management
Jan 8, 2003
2
0
0
GB
Hi All,

I have a simple VB6 exe running on windows 2000 which
reads a text file then prints the contents and adds it to
an SQL database.

Seemingly completely at random the above error will
happen, it appears to be when the code moves to read the
next line of the file but it is never in the same place
and not all the time.

I am using the file system object to read the file and I
would appreciate any advice people have, as I am
completely stumped by this one!

Thanks
 

Are you opening this file across your network? If so your network may be dropping your connection thus making your object invalid. To cure this problem copy the file locally and then process. This will also put less strain on your network.

Good Luck

 
This is a generic COM error that it uses when it doesn't know what else to give you.

If you search on this phrase in MSDN there's a couple of documents that have big lists of things to check... most of them are common-sense stuff like setting object variables to Nothing when you no longer need them, etc.

Chip H.
 
I had also this problem,and i have simply solved it by remove the VB6 and install it again.

GOOD LUCK!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top