×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Develop VB 6 routines for ACCPAC Pervasive SQL

Develop VB 6 routines for ACCPAC Pervasive SQL

Develop VB 6 routines for ACCPAC Pervasive SQL

(OP)

HI,

 We have been using ACCPAC for year and half, it is fully implemented. Now we are in need of some extra module / routine to browse data on screen. I have developed some programs in VB 6.0 my backend was access. Now I am thinking of developing some routines in visual basic 6.0 for ACCPAC using Pervasive SQL (LANPAK for  Novell)  as backend.
 I shall be most grateful if you could help me to start this development, as I have no idea how to link with the database. A Sample Code to open and link the database will be apperiated.

 Thanking You
  
 Javed Ahmed

RE: Develop VB 6 routines for ACCPAC Pervasive SQL

From VB you can access the actual Accpac database via the xAPI com interface supplied by Accpac. From here you can do almost anything Accpac can do and it will follow all of Accpac's business logic and rules through the use of views.

If you want a secondary backend database to store data you can use anything including Access.

You will need to add a reference to the ACCPACXAPI 1.1 type library in your VB project and then you are ready to go. The file is a4wcom.dll located in the accpac\runtime directory.

Declare a session object (scope is up to you, I use a global one declared in a module)

  Public Session As ACCPACXAPILib.xapiSession

Open the session where you like,(The information you supply is user name, password and company name (in that order). The user can be any valid Accpac user for the company.

   Set Session = CreateObject("ACCPAC.xapisession")
   Session.Open "ADMIN", "ADMIN, "SAMINC", Date, 0

Now you are in. To open a view of AR customers do the following

   Dim ARCUSTOMER As ACCPACXAPILib.xapiView
   Set ARCUSTOMER = Session.OpenView("AR0024", "AR")
   With ARCUSTOMER
      .Init
      .Order = 0
      .Browse "IDCUST = " & g_strCustID & "", True
      If .Fetch Then
         <variable1> = Trim(.Fields("IDCUST").value)
         <variable2> = Trim(.Fields("NAMECUST").value)
         ...etc....
     End If
     .Cancel
   End With

You can use recorded macros from Accpac to see which views you need.

Unfortunatly there is not much helpful information on the xAPI from Accpac. Look up 'xAPI' in this forum for some more information and some examples.

Thanks and Good Luck!

zemp

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close