Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GoldMine GMCOMApi
Message
 
À
21/01/2004 10:52:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00868533
Message ID:
00869080
Vues:
17
Hi Doug,
Thanks for the reply. I initially tried something akin to what you suggest, but ended up with the code below. The reason I went this route is because I can't figure out what to change in order to get past the 50 record retrieval limit. If you know and could let me know that would be great, I'm interested in running some speed tests. Thanks alot,

jfh
*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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform