Solved

run time error -2147467259 (80004005)  =  unspecified error vb6 & mySQL

Posted on 2004-10-13
15
1,370 Views
Last Modified: 2008-01-09
Hi guys, I have an app. that uses vb6, mySQL & myODBC, I developed it using a computer with win2K OS and the app. was working fine, last week I had to format my hard drive then I installed Win-Xp Pro, I allready configured myODBC and I can see my database that is in a server, but when I try to run my app. the following error appear:

run time error -2147467259 (80004005)
unspecified error vb6 & mySQL

I think that I have to make an ADO reference in the vb project but I'm not sure which one, my code is:

'    Set conn = New ADODB.Connection
'
'    Set rsAccesos = New ADODB.Recordset
'
'    conn.CursorLocation = adUseClient
'    conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
'        & "SERVER=192.168.8.228;" _
'        & "DATABASE=scrc;" _
'        & "UID=test;" _
'        & "PWD=;" _
'        & "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384
'
'    conn.Open

The app. stops in the last line "conn.Open"

Thank's guys
0
Comment
Question by:pander
15 Comments
 
LVL 7

Accepted Solution

by:
HoweverComma earned 350 total points
Comment Utility
That error sounds like you need to install the MySQL ODBC 3.51 DAO...
Most of the time a missing component causes a -2147467259 RTE

In the IDE you need to also go to Project-->References and select the MySQL driver.
The choice will be obvious just scroll down the list it should be the exact text in Driver = or something very similar
0
 
LVL 10

Expert Comment

by:anv
Comment Utility
0
 

Author Comment

by:pander
Comment Utility
Thank's However, I allready installed MyODBC 3.51 and I tested my connection to the data base and it connected succesfully

VISUAL BASIC FOR APPLICATION
VISUAL BASIC RUNTIME OBJECTS AND PROCEDURES
VISUAL BASIC OBJECTS AND PROCEDURES
OLE AUTOMATION
MICROSOFT ACTIVEX DATA OBJECTS 2.5 LIBRARY
MICROSOFT DAO 3.51 OBJECT LIBRARY
MICROSOFT DATA BINDING COLLECTION VB 6.0 (SP4)
MICROSOFT DATA FORMATTING OBJECT LIBRARY 6.0 (SP6)
MICROSOFT DATA REPORT DESIGNER 6.0 (SP4)
MICROSOFT CONNECTION DESIGNER INSTANCE 1.0
MICROSOFT REMOTE DATA OBJECT 2.0
MICROSOFT DATA ENVIRONMENT INSTANCE 1.0 (SP4)

Before I change my OS from Win2K to Win Xp Pro I made a backup then I restored it and I didn't do anything and the error still apear.
0
 

Author Comment

by:pander
Comment Utility
Sorry, the upercase lines are the references I have in my project.
0
 
LVL 7

Expert Comment

by:HoweverComma
Comment Utility
I do not personally use MySQL but I do not see anything in you project references.

Do you have a system DSN set?
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:pander
Comment Utility
Yes My DSN is "scrc"
0
 

Author Comment

by:pander
Comment Utility
Look, what I have:

1 - The Data Base is scrc that is in a server
2 - MySQL Server & Client, MySQL Admin and MyODBC are allredy installed on my computer
3 - Also I allready installed SP6 on my Visual Basic 6

I Allredy configured MyODBC and my DSN is scrc then When I make the conection using MyODBC is succesfully.

0
 

Author Comment

by:pander
Comment Utility
Thank's guys, I allready fix the problem, the solution was to reinstall MyODBC.
0
 

Expert Comment

by:modulo
Comment Utility
PAQed with points refunded (350)

modulo
Community Support Moderator
0
 
LVL 7

Expert Comment

by:HoweverComma
Comment Utility
What gives?????
0
 
LVL 7

Expert Comment

by:HoweverComma
Comment Utility
Thanks modulo.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now