Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XAPI return values are blank

Status
Not open for further replies.

Bluejay07

Programmer
Mar 9, 2007
780
CA
Hello,

I have a program which has worked for years in various environments. This program uses xapi and has recently been installed on a client's machine.

I'm assuming this issue is environmental since no one else has encountered this issue, however, the values that are being returned from an xapi call are blank.

Here's the situation: a user clicks a finder which sets up a form displaying the accpac information. The query results display fine, however, I am receiving blank header information when the FinderFields function is being used. Since the code is very spread out, here is a small sample:
Code:
Public FinderFields As ACCPACXAPILib.xapiFields

...

   With myFinderForm.FinderGrid
      For i = LBound(FieldCols) To UBound(FieldCols)

[red]
*** This section returns a blank string.  ***

         .TextMatrix(0, i) = Trim$(FinderFields(FieldCols(i).ColName).Description)

*** Eg. Trim$(FinderFields("NAMECUST").Description) = ""
*** It should be ... = "Customer Name"
[/red]

         .ColWidth(i) = FieldCols(i).ColWidth
         .ColAlignment(i) = FieldCols(i).ColAlign
         l_lngWidth = l_lngWidth + .ColWidth(i)
      Next i

The client is using Accpac 55, SQL 2008 and Windows Server 2003 Standard Edition.

From what I can tell all sections (ODBC, database and permissions) seem to be configured correctly.

As mentioned, this has never been an issue until this install. Does anyone have any suggestions on what might be causing this to happen?

As a separate issue, this same client is running another program and the accpac error handler returns a blank description. I'm assuming these issues are related, but I haven't found a cause or solution.

If at first you don't succeed, then sky diving wasn't meant for you!
 
There is not much information to go on. Xapi is history, you should look at comapi. Doing the finders that way is clunky to say the least.
Compare versions and service packs between this client and other clients where it is running.
 
Hi Ettienne,

There is too much involved in switching this program to comapi (although we have been using comapi for new projects for a couple of years now).

Yes it may be clunky however do to the diversity of this program, the original programmer did a great job creating this section and it works ... until now.

I've been comparing all settings in my test enviroment and the client environment and I can see any differences.

If at first you don't succeed, then sky diving wasn't meant for you!
 
Hi Tuba,
I deleted the associated files; however, it didn't seem to make any difference.

If at first you don't succeed, then sky diving wasn't meant for you!
 
Actually by deleting those files, accpac and my program no longer work.

Accpac error:
Cannot access database (error=49153)...
Microsoft.ODBC SQL Server Driver.Shared Memory. SQL Server does not exist or access denied.

If at first you don't succeed, then sky diving wasn't meant for you!
 
That makes no sense, deleting the xxxxxx_P.ISM files never affects data. You must have deleted something else.
 
Nothing else was deleted. That I can guarantee.

If at first you don't succeed, then sky diving wasn't meant for you!
 
Well, somebody did something wrong. Or maybe it's just coincidence, and your server went down.
 
I can't even log into SQL at all.
"A network-ralted or instance specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible..."

In this case everything is installed locally.

If at first you don't succeed, then sky diving wasn't meant for you!
 
It seems like it was a coincidence as restarting SQL today is fine. Still no difference of return values.

If at first you don't succeed, then sky diving wasn't meant for you!
 
Hi DjanMan,
The above does show the correct value when stopped at a break point.
I was remotely connected all day yesterday and I can't determine the cause. I ran regacc, verified permissions, checked ODBC settings, verified Accpac database settings, and probably several other things.
With all this, Accpac itself seems to work fine but not my program. To me it seems like there is some sort of communication failure between my program and certain responses from Accpac (for example the values are retrieved properly from the finder query but accessing the description for column headers doesn't). It's really weird and a bit hard to explain.

If at first you don't succeed, then sky diving wasn't meant for you!
 
FinderFields is the name of a variable in the VB6 development environment associated with an xapi call that processes the field values from an accpac view once it is opened and compiled.



If at first you don't succeed, then sky diving wasn't meant for you!
 
More specifically, here is a sample of the code used to set it up.
Code:
Public FinderView As ACCPACXAPILib.xapiView
Private View1 As ACCPACXAPILib.xapiView

...

Select Case View.ID
   Case "AR0024"        '// Customers.
      Set FinderView = View
      Set View1 = FinderSession.OpenView("AR0400", "AR")
      FinderView.Compose Array(View1)
      View1.Compose Array(FinderView)

      Set FinderFields = FinderView.Fields

If at first you don't succeed, then sky diving wasn't meant for you!
 
In this case, it's all the finders. I just used AR as an example. Although as mentioned above, this program has been running on many other client machines for years and this has never been an issue before. That's why it's such an unusual situation and becoming extremely hard to diagnose.

If at first you don't succeed, then sky diving wasn't meant for you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top