×
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

Invalid Signon Information (Login to SAGE 300 from VB.NET)
2

Invalid Signon Information (Login to SAGE 300 from VB.NET)

Invalid Signon Information (Login to SAGE 300 from VB.NET)

(OP)
I get this error when I run my program, please help



I already input the right user and password but still get the error.
And after I checked the program, It can run well in Windows 10 but get the error above if run in Windows Server.

and this is my script :

'Accpac Session (Must be created)
Dim session As ACCPAC.Advantage.Session
Dim mDBLinkCmpRW As ACCPAC.Advantage.DBLink

session = New ACCPAC.Advantage.Session()
session.Init("", "XX", "XX1000", "65A")
session.Open("ADMIN", "ADMIN", "TESTDT", DateTime.Today, 0)
mDBLinkCmpRW = session.OpenDBLink(ACCPAC.Advantage.DBLinkType.Company, ACCPAC.Advantage.DBLinkFlags.ReadWrite)

'Declare GL Entry View
Dim GLBATCH1batch As ACCPAC.Advantage.View
Dim GLBATCH1header As ACCPAC.Advantage.View
Dim GLBATCH1detail1 As ACCPAC.Advantage.View
Dim GLBATCH1detail2 As ACCPAC.Advantage.View
Dim GLPOST2 As ACCPAC.Advantage.View

'Open GL Entry View
GLBATCH1batch = mDBLinkCmpRW.OpenView("GL0008")
GLBATCH1header = mDBLinkCmpRW.OpenView("GL0006")
GLBATCH1detail1 = mDBLinkCmpRW.OpenView("GL0010")
GLBATCH1detail2 = mDBLinkCmpRW.OpenView("GL0402")
GLPOST2 = mDBLinkCmpRW.OpenView("GL0030")

'Compose GL Entry View
GLBATCH1batch.Compose({GLBATCH1header})
GLBATCH1header.Compose({GLBATCH1batch, GLBATCH1detail1})
GLBATCH1detail1.Compose({GLBATCH1header, GLBATCH1detail2})
GLBATCH1detail2.Compose({GLBATCH1detail1})


GLBATCH1batch.RecordCreate(ViewRecordCreate.Insert)
GLBATCH1batch.Fields.FieldByName("PROCESSCMD").SetValue("1", False) ' Lock Batch Switch
GLBATCH1header.Fields.FieldByName("BTCHENTRY").SetValue("00000", False) ' Entry Number

GLBATCH1header.RecordCreate(ViewRecordCreate.DelayKey)
GLBATCH1batch.Fields.FieldByName("BTCHDESC").SetValue("Merchant Settlement 20180620", False) ' Description
GLBATCH1header.Fields.FieldByName("DOCDATE").SetValue("2018, 6, 20", False) ' Document Date

GLBATCH1detail1.RecordCreate(ViewRecordCreate.NoInsert)
GLBATCH1detail1.Fields.FieldByName("TRANSNBR").SetValue("-000000003", False) ' Transaction Number
GLBATCH1detail1.Fields.FieldByName("ACCTID").SetValue("220101", False) ' Account Number
GLBATCH1detail1.Fields.FieldByName("TRANSDESC").SetValue("Merchant settlement - PT INOVASI DAYA SOLUSI", False) ' Description
GLBATCH1detail1.Fields.FieldByName("TRANSREF").SetValue("PAYOUT_20180620_20180621031003", False) ' Reference
GLBATCH1detail1.Fields.FieldByName("SCURNAMT").SetValue("-7364878", False) ' Source Currency Amount
GLBATCH1detail1.Insert()

GLBATCH1detail1.RecordCreate(ViewRecordCreate.NoInsert)
GLBATCH1detail1.Fields.FieldByName("TRANSNBR").SetValue("-000000004", False) ' Transaction Number
GLBATCH1detail1.Fields.FieldByName("ACCTID").SetValue("220101", False) ' Account Number
GLBATCH1detail1.Fields.FieldByName("TRANSDESC").SetValue("Merchant settlement - PT INOVASI DAYA SOLUSI", False) ' Description
GLBATCH1detail1.Fields.FieldByName("TRANSREF").SetValue("PAYOUT_20180620_20180621031003", False) ' Reference
GLBATCH1detail1.Fields.FieldByName("SCURNAMT").SetValue("0", False) ' Source Currency Amount
GLBATCH1detail1.Insert()

GLBATCH1detail1.RecordCreate(ViewRecordCreate.NoInsert)
GLBATCH1detail1.Fields.FieldByName("TRANSNBR").SetValue("-000000005", False) ' Transaction Number
GLBATCH1detail1.Fields.FieldByName("ACCTID").SetValue("401001", False) ' Account Number
GLBATCH1detail1.Fields.FieldByName("TRANSDESC").SetValue("Merchant settlement - PT INOVASI DAYA SOLUSI", False) ' Description
GLBATCH1detail1.Fields.FieldByName("TRANSREF").SetValue("PAYOUT_20180620_20180621031003", False) ' Reference
GLBATCH1detail1.Fields.FieldByName("SCURNAMT").SetValue("47541", False) ' Source Currency Amount
GLBATCH1detail1.Insert()

GLBATCH1detail1.RecordCreate(ViewRecordCreate.NoInsert)
GLBATCH1detail1.Fields.FieldByName("TRANSNBR").SetValue("-000000006", False) ' Transaction Number
GLBATCH1detail1.Fields.FieldByName("ACCTID").SetValue("211000", False) ' Account Number
GLBATCH1detail1.Fields.FieldByName("TRANSDESC").SetValue("Merchant settlement - PT INOVASI DAYA SOLUSI", False) ' Description
GLBATCH1detail1.Fields.FieldByName("TRANSREF").SetValue("PAYOUT_20180620_20180621031003", False) ' Reference
GLBATCH1detail1.Fields.FieldByName("SCURNAMT").SetValue("4754", False) ' Source Currency Amount
GLBATCH1detail1.Insert()

GLBATCH1detail1.RecordCreate(ViewRecordCreate.NoInsert)
GLBATCH1detail1.Fields.FieldByName("TRANSNBR").SetValue("-000000007", False) ' Transaction Number
GLBATCH1detail1.Fields.FieldByName("ACCTID").SetValue("151009", False) ' Account Number
GLBATCH1detail1.Fields.FieldByName("TRANSDESC").SetValue("Merchant settlement - PT INOVASI DAYA SOLUSI", False) ' Description
GLBATCH1detail1.Fields.FieldByName("TRANSREF").SetValue("PAYOUT_20180620_20180621031003", False) ' Reference
GLBATCH1detail1.Fields.FieldByName("SCURNAMT").SetValue("-951", False) ' Source Currency Amount
GLBATCH1detail1.Insert()

GLBATCH1detail1.RecordCreate(ViewRecordCreate.NoInsert)
GLBATCH1detail1.Fields.FieldByName("TRANSNBR").SetValue("-000000008", False) ' Transaction Number
GLBATCH1detail1.Fields.FieldByName("ACCTID").SetValue("202001", False) ' Account Number
GLBATCH1detail1.Fields.FieldByName("TRANSDESC").SetValue("Merchant settlement - PT INOVASI DAYA SOLUSI", False) ' Description
GLBATCH1detail1.Fields.FieldByName("TRANSREF").SetValue("PAYOUT_20180620_20180621031003", False) ' Reference
GLBATCH1detail1.Fields.FieldByName("SCURNAMT").SetValue("7313534", False) ' Source Currency Amount
GLBATCH1detail1.Insert()

GLBATCH1header.Fields.FieldByName("JRNLDESC").SetValue("PT INOVASI DAYA SOLUSI", False) ' Description
GLBATCH1header.Insert()

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

1. Use the COMAPI, not the Accpac Advantage library.
2. Make sure Sage is installed on the server

Sage 300 Whisperer

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

(OP)
Do you have sample or tutorial how to use COMAPI?
I have already installed Sage on the server.

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

It's pretty much the same except for the AccpacCOMAPI in your project References.

...
Public Session As AccpacSession
Public a4wLink As AccpacDBLink
Public a4wLinkRead As AccpacDBLink
...
Session = New AccpacSession
Session.Init("", "XY", "XY0001", "65A")
Try
Session.Open(My.Settings.SageUser, My.Settings.SagePW, My.Settings.Company, Date.Today, 0, "")
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
a4wLink = Session.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE)
a4wLinkRead = Session.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READONLY)
...

Also note that Sage passwords should be in UPPERCASE

Sage 300 Whisperer

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

(OP)
Thanks much Jay thumbsup2

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

(OP)
I had tried your method but I got error "Session is not opened" on the line "a4wLink..."

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

Then you're doing something basic wrong. Can you login to the Sage desktop on that server with those credentials?

Sage 300 Whisperer

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

(OP)
Yes, I can login to Sage desktop with those credentials. When I run my program I cannot open the session from server that use windows server 2016 but when I run it from client that use windows 10 it can run well without any session problem.

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

Then something isn't correctly installed. Make sure all Sage installs are at the same service pack level, and disable UAC on the server.

Sage 300 Whisperer

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

Try running Visual Studio as administrator.

RE: Invalid Signon Information (Login to SAGE 300 from VB.NET)

(OP)
Thanks jay and DjangMan, I can run the program well after run the Visual Studio as Administrator thumbsup2

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!

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