Mamut API

Mamut API

Mamut APISven Olav Rosnes, Senior consultant,

Mamut APIAgendaWhat is Mamut API?RequirementsConnecting to the databaseCode examplesExamples of usageQ & A

Mamut APIWhat is Mamut APICOM component called GBAAPIAPI: Application Programming InterfaceAn interface for communicating with the MBS databaseSupports large parts of most major modules in MBSMost common use:Expand functionality by integrating other softwareImport data

Mamut APIRequirements 1/2Mamut API licenseAny tool that supports ActiveX/COMWritten in Visual FoxPro but is language-independentMicrosoft WindowsData Execution Prevention OFFWin 2003 / XP: “Turn on DEP for essential Windows...”or Boot.ini /noexececute=AlwaysOffVista: Command prompt bcdedit /set nx alwaysoff

Mamut APIRequirements 2/2MBS installed on the same machineDo not need to use MBS – only need to be installedNeed write access to the document areaDo not use the Example database (12.2.7007 and 7038)Only one version of MBS installedMamut API registered in WindowsGBAAPI Reg.batAppPath in Registry etcReinstall/repair MBS to fix

Mamut APIConnecting to the database 1/3Interim solutionWorks with MBS12, not MBS14oGBA.setclientpath() points to Database.ini1. oGBA = CreateObject("gbaapi.gba")2. oGBA.setclientpath("C:\Documents and Settings\All Users\PublicMamut\Mamut\_MBS12_7038\Data\system")

Mamut APIConnecting to the database 2/3Permanent solutionConnectInfo class1. oGBA = CreateObject("GBAAPI.GBA")2. oconn = CreateObject("gbaapi.ConnectInfo")3. oconn.SetConnectBasicInfo(".", "MAMUT", 30, 1)4. oGBA.OpenConnection(oconn)

Mamut APIConnecting to the database 3/3Connecting only to the system database1. oConn.PartialInit = TrueExample:Find Mamut.ini from IniFile in RegistryFind system database number in Mamut.iniConnect to system database onlyQuery the table g_clientConnect to system and client database

Mamut APICode examples 1/2Early binding / Late bindingRecommend Late bindingCheck “GBAe2apiErrors.txt “ for errorsLocated in “My Documents” (created when the first error occurs)May use ogba.Raiseexceptiononerror = TrueTo throw the error back to the applicationMay result in “Successfully...OK” error in VB 2005New field: g_contac.Custid, new meaning: g_contac.contidCreateNewByCustid(), GetByCustid()

Mamut APICode examples 2/2Newinit(oGBA)More important than beforeExamples:Create customerCreate productCreate invoiceCreate payment journal entry

Mamut APIExamples of usagewww.integrasjonspartner.nowww.edi-soft.noEDI softwarewww.proline.noPOS etc.www.savanne.noBarcode scanning for sales orders and stocktaking+ many others

Mamut APIQuestions?

More magazines by this user
Similar magazines