*create the goldmine object oGM = CREATEOBJECT( 'GMCOMApi.Application' ) *set required properties oGM.CommonFolder = 'd:\program files\goldmine\common' oGM.GoldMineFolder = 'd:\program files\goldmine\gmbase' oGM.SystemFolder = 'd:\program files\goldmine' *set username and password oGM.GMUserName = 'jherring' oGM.GMPassword = '' *call login oGM.Login() *create contact object to hold reference to contact1 table oContact = oGM.NewWorkArea( 'contact1' ) oContact.SetOrder( 'contname' ) oContact.Top() *create a junk table for display purposes CREATE CURSOR curGm ( ; company c( 40 ), ; contact c( 40 ), ; lastname c( 15 ), ; accountno c( 20 ) ) *append from goldmine into the new cursor INSERT INTO curGm ( ; company, ; contact, ; lastname, ; accountno ) ; VALUES ( ; oContact.Read( 'company' ), ; oContact.Read( 'contact' ), ; oContact.Read( 'lastname' ), ; oContact.Read( 'accountno' ) ) *scan the oContact data object, store all the values DO WHILE oContact.skip( 1 ) = 1 IF EMPTY( oContact.Read( 'accountno' ) ) LOOP ENDIF INSERT INTO curGm ( ; company, ; contact, ; lastname, ; accountno ) ; VALUES ( ; oContact.Read( 'company' ), ; oContact.Read( 'contact' ), ; oContact.Read( 'lastname' ), ; oContact.Read( 'accountno' ) ) ENDDO *pick up your socks oContact = .Null. oGM.Logout() oGM = .Null. RELEASE oContact, oGM