Solved

ebay sdk vb6 code won't work with latest SDK

Posted on 2010-08-23
12
992 Views
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.
Thanks,
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
0
Comment
Question by:aonecomputers
  • 5
  • 4
  • 3
12 Comments
 
LVL 19

Expert Comment

by:Rimvis
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.
0
 

Author Comment

by:aonecomputers
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.

0
 
LVL 19

Expert Comment

by:Rimvis
ID: 33602168
Did you find any errors in Event Log?
0
 
LVL 3

Expert Comment

by:Genetic_Wolf
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.
http://developer.ebay.com/developercenter/windows/sdk/

and the eBay SDK for Java v673
http://developer.ebay.com/community/featured_projects/?name=ebay+sdk+for+java

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

ensure you've downloaded the Java SDK.
0
 

Author Comment

by:aonecomputers
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?
0
 
LVL 19

Expert Comment

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

0
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.

 
LVL 3

Expert Comment

by:Genetic_Wolf
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 ?
0
 

Author Comment

by:aonecomputers
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
0
 
LVL 3

Accepted Solution

by:
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.
0
 

Author Comment

by:aonecomputers
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.
Thanks!
0
 

Author Comment

by:aonecomputers
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,
Ed
0
 
LVL 3

Expert Comment

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

thanks for the grade.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…

746 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

11 Experts available now in Live!

Get 1:1 Help Now