Thread: VBA/API and PHP
View Single Post

Old 11-26-2007, 10:03 AM   #27 (permalink)
ttavenner ttavenner is offline
Junior Member

Join Date: Sep 2007
Location: Fairfax, VA
Posts: 17
Rep Power: 0 ttavenner is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- API/VBA

Quote:
Originally Posted by DavidZ View Post
I have worked with the API in VB6, VB.NET, C# and C++ but never PHP. However using C++ was the biggest pain I have ever experienced. I have sympathy for you trying to get PHP to work.

I know that PHP works with option parameters but are you sure that it does via COM? It is only the two VB languages that have optional parameters native to their languages out of the ones that I have tried. Have you tried putting in all the parameters for Init method. Do not leave anything to chance.

(, , , , "", BBREAPI7::amServer );

Also I know that VB strings are not null terminated so I am not sure if this makes a difference (I assume that php string being similar to C, C++, java etc are null terminated). You may or may not need to convert them before sending them in. If you have worked with C++ before you may want to check out my blog post on the subject:

RE-Decoded Blog Archive C++ and the API

Hope this is of some help

David
Amazing. I thought I had experimented with all of the optional values, but it turns out I had never included the App Mode. By sending the boolean value for the App Mode, I was able to login correctly. It's not the speediest connection, so I still may be better off accessing the database directly but at least its something to experiment with.
Reply With Quote