×
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

Sage 300 Signon Manager does not create create session

Sage 300 Signon Manager does not create create session

Sage 300 Signon Manager does not create create session

(OP)
Hi All,

I have a total anomaly when tapping into a session and/or creating a new session.

I have one instance where my normal code that usually works like a charm, opens the session manager, but on the .CreateSession fails to tap into or create the session. It jumps at the .CreateSession line to the error trap. It however opens the Signon Manager, but with no Session ID entry:

Option Compare Database
Option Explicit

Public Session As AccpacCOMAPI.AccpacSession
Public Signon As New AccpacSessionMgr
Public lSignonID As String
Public AnyError As Boolean
Public OpenSession As Boolean
Public mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Public mDBLinkSysRW As AccpacCOMAPI.AccpacDBLink
Public Accpac_User As String
Public Accpac_CompanyID As String
Public Accpac_CompanyName As String

Public Function OpenMyModule(MyAppID As String, MyProg As String)
On Error GoTo Err_OpenModule

OpenSession = False
lSignonID = 0
Set Signon = New AccpacSessionMgr
With Signon
.AppVersion = "65A"
.AppID = MyAppID
.ProgramName = MyProg
.ForceNewSignon = False
.CreateSession "", 1, Session
End With
OpenSession = True . . . . . . etc.

I've changed the script to include Set Session = New AccpacCOMAPI.AccpacSession, force a signoff of session 1 and also force a new session to initialize session 1 again:

Set Session = New AccpacCOMAPI.AccpacSession

OpenSession = False
lSignonID = 0
Set Signon = New AccpacSessionMgr
With Signon
.AppVersion = "65A"
.AppID = MyAppID
.ProgramName = MyProg
.Signoff "1"
.ForceNewSignon = True
.CreateSession "", 1, Session
End With
OpenSession = True

RvSpy and DBSpy does not show me anything.

I'm using Sage 300 (2018) and tried both a workstation install and a local instance. The PC runs on Win8.1 with Office 2013 32-bit.

It might be that a security setting somewhere prevents the signon, but I've also disabled the antivirus and all of the folders have full read/write access.

Thanx in advance for your replies.

RE: Sage 300 Signon Manager does not create create session

Why do you want a signon manager? Are you running a screen or macro via code? Or are you just interacting with the views?

RE: Sage 300 Signon Manager does not create create session

(OP)
Hi DJangMan,

It is a custom application that runs from MS Access. They retrieve multiple transactions from a web utility and process them in one go, using the related views.

RE: Sage 300 Signon Manager does not create create session

Then you don't need to use the signon manager. Just create an AccpacSession object and pass along the user id/password and go from there.

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