• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1057
  • Last Modified:

ebay sdk vb6 code won't work with latest SDK

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
aonecomputers
Asked:
aonecomputers
  • 5
  • 4
  • 3
1 Solution
 
RimvisCommented:
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
 
aonecomputersAuthor Commented:
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
 
RimvisCommented:
Did you find any errors in Event Log?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Genetic_WolfCommented:
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
 
aonecomputersAuthor Commented:
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
 
RimvisCommented:
COntrol Panel->Administrativ Tools->Event Viewer. Check Application and System logs

0
 
Genetic_WolfCommented:
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
 
aonecomputersAuthor Commented:
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
 
Genetic_WolfCommented:
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
 
aonecomputersAuthor Commented:
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
 
aonecomputersAuthor Commented:
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
 
Genetic_WolfCommented:
misterious thing from Microsoft somethime happen...
especially with registration ;)

thanks for the grade.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now