Run-time error

iskhchan
iskhchan used Ask the Experts™
on
Hello,

I'm programming with VB6 and SQL server 7.0. When the user are doing enquiry on something in SQL server, run-time error occur:

<
  Run-time error '-2147467259 (80004005)':

  Unspecified error
>

As from microsoft website, it may occurs when 'Creating Fabricated Hierarchical Recordset Fails Using MDAC 2.1SP2'. Actually, I didn't do that at all.

Does anybody encounter such problem before? Please help.

Reference from microsoft: http://support.microsoft.com/default.aspx?scid=KB;en-us;q240341

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
try changing the .CommandType to adCommandText.

Author

Commented:
What I'm trying to do is to post some sql to get a recordset and fill in some text fields and datagrid.

<
  Dim rs As New Recordset
  sql = "select xxx from yyy....."
  setrecordset rs, MainDef.Connection, sql, true

  If Not rs.Eof Then
     .
     .
     .
  End If
  rs.Close
  .
  .
  .
>

Is there any possibility to get such error?

Commented:
upgrade MDAC version may help you.

You can download from miscrosoft.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

First of all, I recommend using error handling in the code.  Then go to Tools...Options...General tab and select "Break on all errors.  This will give you the exact line the error occurred on.  I notice you are using a subroutine you wrote called setrecordset.  The error could be happening in there and if it does, the code will stop right there.  Then when the code breaks, go to immediate window (Ctrl-G) and ? err.description.  Also try looking at err.lastdllerror.  When the code breaks, do a "? sql" (or whatever variable contains the SQL statement in the setrecordset routine.  Then copy and paste that into SQL server Query analyzer.  If you get a failure there, you can troubleshoot the sql.  If you don't get an error there, it probably is in code.

Author

Commented:
How to check my MDAC version? Is it from VB -> project -> Reference?

Then how to check user's MDAC version since NO VB is installed in their machine.

If I upgrade my MDAC to 2.7 for deployment, do I need to upgrade the client's machines as well?

Thanks.

Author

Commented:
How to check my MDAC version? Is it from VB -> project -> Reference?

Then how to check user's MDAC version since NO VB is installed in their machine.

If I upgrade my MDAC to 2.7 for deployment, do I need to upgrade the client's machines as well?

Thanks.

Author

Commented:
How to check my MDAC version? Is it from VB -> project -> Reference?

Then how to check user's MDAC version since NO VB is installed in their machine.

If I upgrade my MDAC to 2.7 for deployment, do I need to upgrade the client's machines as well?

Thanks.
Here's how you check the MDAC Version.
http://support.microsoft.com/default.aspx?scid=KB;en-us;q301202

If you updgrade to mdac 2.7, and use an installer, this will be taken care of during installation (client machine updates).

Author

Commented:
How to check my MDAC version? Is it from VB -> project -> Reference?

Then how to check user's MDAC version since NO VB is installed in their machine.

If I upgrade my MDAC to 2.7 for deployment, do I need to upgrade the client's machines as well?

Thanks.
Try not to refresh the page, it results in multiple same postings.  Use the Reload This Question at the top left.

Author

Commented:
I'm sorry.
see my comment above for how to check the MDAC version.

Author

Commented:
I've got it, thanks a lot!
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
- points to twalgrave
Please leave any comments here within the
next seven days.
answer force-accepted

DigitalXtreme
CS Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial