ebay sdk vb6 code won't work with latest SDK

Posted on 2010-08-23
Last Modified: 2012-05-10
I have a huge VB6 program that has been working for years and is only used in house so it is not worth rewriting it all in It lists items on ebay, tracks sales, etc. It uses ebay trading api. It has been working fine but now with the new item condition I had to upgrade the SDK from 581 to 673 and it broke. I can no longer get a simple call to work such as the below one. It returns Run time error '429': ActiveX component can't create object on the set apic line.
I have added the eBay_service to the references. Anybody have any ideas how to get it to work w/o rewriting all the code in .net. I have also tried it without the eBay_Service. in front of ApiContext. The below code worked fine in the 581 SDK. I believe they upgraded from .net framework 1 to 2.
Here is the code that has alwasy worked and no longer works.
Set apicon = New eBay_Service.ApiContext 'this line gives the error
Set apicon = New ApiContext 'this line also gives the error

here is a sample of code from ebay in .net that will run on my system in vb express 2010
apiContext = New ApiContext
Question by:aonecomputers
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
LVL 19

Expert Comment

ID: 33593936
Check your component references. Most likely, component version has changed, and it broke references in your project. It's also possible, that in new SDK you should use different component.Check your event log, you might find some info there.

Author Comment

ID: 33598247
I had already changed the project, references to ebay service ver 6.73 if thats what you mean.
This has to be done every time they come out with an new api, every couple months. Never had problem with code working before though. The only differnce between this update and others is that is said this one used .net framework v2 where the other ones used v1. I have the .net framework v2 and all updates on the system.

LVL 19

Expert Comment

ID: 33602168
Did you find any errors in Event Log?
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.


Expert Comment

ID: 33613291
the eBay SDK 581 was a Java product.

BUT there is 2 flavor of the eBay SDK v673 (stupid naming system)
the eBay SDK v673 .NET 2.0 product.

and the eBay SDK for Java v673

you cannot reference a .NET SDK in Vb6, you'll need a Vb.NET product.

ensure you've downloaded the Java SDK.

Author Comment

ID: 33619393
Rimvis: Where is the event log?

Genetic Wolf: The 581 I am using is a .net SDK point release not java and worked fine in vb6. As I stated I cannot convert all my code.
Line from the readme.htm file "SDK Version 581 for .NET Point Release"
Can I use the Java version? How would I include the referance in the VB6 code?
LVL 19

Expert Comment

ID: 33624275
COntrol Panel->Administrativ Tools->Event Viewer. Check Application and System logs


Expert Comment

ID: 33648380
thanks for the added information.  I finally found your version of the SDK.

when you downloaded the new SDK, did you downloaded a point release or a full SDK ?
there were significant change from v581 and  v673, it might be required for you to install a full sdk.

for your answer, Yes you can use the Java SDK in your program but it would require too much change since your program has been created using the .NET sdk

can you tell me what are the major function of the SDK you're using in your program, so I can build a test app and send you code of a working layout ?  maybe that would help you ?

Author Comment

ID: 33648755
Rimvis: I just switched the reference from ebay service 581 to 673 and ran the program until the error. Stopped the program and looked at the logs. There are no new events in any of the logs.

IGenetic Wolf:
 installed the full .net SDK.
The main problem I am having now is listing an item. But it doesn't even get to the code that fills in the credentials. The line Set apicontext = New apicontext fails saying Run time error 429 AcitveX component can't create object.
VB6 code that fails in 673 but works in 581
Function ebayAPIcontext() As apicontext
    Set apicontext = New apicontext
    apicontext.ApiCredential.ApiAccount.Developer = frmSetup.regEbayDeveloper
    apicontext.ApiCredential.ApiAccount.Application = frmSetup.regEbayApplication
    apicontext.ApiCredential.ApiAccount.Certificate = frmSetup.regEbayCertificate
    apicontext.SoapApiServerUrl = ""
    apicontext.EPSServerUrl = ""
    apicontext.ApiCredential.eBayToken = frmSetup.regEbayToken
    Set apicontext.ApiLogManager = New ApiLogManager
    apicontext.ApiLogManager.EnableLogging = 1
    Dim FileLoger As New eBay_Service.FileLogger

    FileLoger.FileName = "c:\auctionsecretary\ebayapi.log"
    FileLoger.LogApiMessages = 1
    FileLoger.LogInformations = 1
    FileLoger.LogExceptions = 1
    apicontext.ApiLogManager.ApiLoggerList.Add FileLoger
    apicontext.timeout = 50000
    Set ebayAPIcontext = apicontext
End Function

Accepted Solution

Genetic_Wolf earned 500 total points
ID: 33654891
ok I see the problem.

you'll probably have to register manually the ActiveX object.
let me install on my system and give you the correct line.

Author Comment

ID: 33655393
Actually that sounds familiar. I had to manuall run a batch file to register older SDKs previously because I was getting an error. I didn't have the problem with 581 so forgot about it. I don't think it was the same error because the error specifically pointed at that as the problem somehow. I will try it at work Monday and see if that solves it. I have the batch file in an older SDK directory.

Author Comment

ID: 33664772
That solved it Genetic Wolf. Thanks. I don't know why it works on the same computer in VB express 2010 without being correctly registered but copying the gacutil.exe from a .net framework 1 directory and the regasm.exe from a .net framework 2 directory into the SDK directory and running regSDK from the command prompt solved the problem. Not sure why there is not a gacutil.exe in .net framework 2 directory but the one from V1 works.
Thanks again,

Expert Comment

ID: 33666601
misterious thing from Microsoft somethime happen...
especially with registration ;)

thanks for the grade.

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 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