Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


ebay sdk vb6 code won't work with latest SDK

Posted on 2010-08-23
Medium Priority
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 vb.net. 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?
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.


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 = "https://api.ebay.com/wsapi"
    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 2000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

604 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