Solved

ebay sdk vb6 code won't work with latest SDK

Posted on 2010-08-23
12
1,005 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

815 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

7 Experts available now in Live!

Get 1:1 Help Now