Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Answered

Gp Dynamics Visual Studio Tools

Posted on by 255
Good afternoon,

I want to use the GPConnNet.dll library to be able to connect to the database 
but I am missing some values ​​in the configuration, mainly in the following sentence
"

Dim cn As New System.Data.Odbc.OdbcConnection

Dim cmd As New System.Data.Odbc.OdbcCommand

Dim rst As System.Data.Odbc.OdbcDataReader

Dim resp As Integer

     Dim GPConnObj As Microsoft.Dexterity.GPConnection

 

'Call Startup

resp = Startup()

 

'Create the connection object

GPConnObj = New Microsoft.Dexterity.GPConnection

 

'Initialize

GPConnObj.Init("<Key1>", "<Key2>")

 

'Make the connection. Use the connection string to set default

'database.

cn.ConnectionString = "DATABASE=TWO"

GPConnObj.Connect(cn, "LocalServer", "LESSONUSER1", "access")

 

'Check the return code

If (GPConnObj.ReturnCode And ReturnCodeFlags.SuccessfulLogin) = _

ReturnCodeFlags.SuccessfulLogin Then

 

'Specify the command to execute - Retrieve all customers

cmd.Connection = cn

cmd.CommandType = CommandType.Text

cmd.CommandText = "Select * From RM00101"

 

rst = cmd.ExecuteReader

           rst.Read()

 

'Display the name of the first customer

MsgBox(rst.Item(1).ToString())

 

'Close the connection

cn.Close()

Else

MsgBox("Login failed.")

End If

 

'Dispose of the connection object

GPConnObj = Nothing

 

'Call Shutdown

resp = Shutdown()

 

End Sub





", What keys do I need for this DLL to Work?
the version of GP that I am using is GP2016 with Sqlserver Version 2012 R2
  • Verified answer
    RE: Gp Dynamics Visual Studio Tools

    If you need registration keys for GPConnNet.dll, open a support case with the Dynamics GP systems team and we can get those keys for you. They're based on the customer or partner name, so if there aren't already keys that have been provided, we can spin up new ones.

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,552 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,552 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Product updates

Dynamics 365 release plans