dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online Memberssrirama
Priya jain
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Resources » Code Snippets » VB.NET Syntax

How to set accpac session using Accpac COMAPI?


Posted Date:     Category: VB.NET Syntax    
Author: Member Level: Bronze    Points: 15


Create the session using Accpac Session manager and we should to give Application id, Application Version ,Program name and one important thing We should Create object handle to open accpac Session.



 




'Global Variables

Dim mSession as New AccpacSession
Dim Sessionmgr as new AccpacSessionManager
Dim ObjectHand as String
Dim mDbLink as AccpacDBLink

'Open Session:
Private sub Form_Load()

'Open Session
With SessionMgr
.AppId="XX"
.AppVersion="56A"
.ProgramName="XX1000"
.ServerName=""
.CreateObjectHandle(ObjectHand,0,mSession)
End With

If mSession.isOpened then

Set mDbLink=mSession.OpenDBLink(DBLinkType.Company,DBLinkFlags.ReadWrite)


End if

'Initialize Views

With adsView1
if .Active=false then
.DBLink=mDbLink
.Active=true
End if
End With

With adsView2
if .Active=false then
.DBLink=mDbLink
.Active=true
End if
End With


With adsView3
if .Active=false then
.DBLink=mDbLink
.Active=true
End if
End With


With adsView4
if .Active=false then
.DBLink=mDbLink
.Active=true
End if
End With

End Sub






Did you like this resource? Share it with your friends and show your love!


Responses to "How to set accpac session using Accpac COMAPI?"

No responses found. Be the first to respond...

Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: Common method to call .rdlc report from your VB.net application
    Return to Resources
    Post New Resource
    Category: VB.NET Syntax


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    Sage Accpac ERP Version 5.6A  .  



    Follow us on Twitter: https://twitter.com/dotnetspider

    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.