Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert into problems?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00042154
Message ID:
00042295
Vues:
22
>>i need to add records to 4 tables. all are open and belong to the same dbc. i've set a couple of variables for fields and generated a unique id for identification.
>>
>>for 3 of the 4 tables, everything works fine. on the fourth, nothing happens. no errors, but no new record. code is:
>>
>>insert into po_cgms!pubs (appl_id) values (lnAppl_ID)
>>
>>this is the same code i use for two of the other tables (table name changed, of course) and those two work.
>>
>>any ideas?
>>
>>
>>btw, has anyone else checked out the newest forum?
>
>Check if your not a the end of table of your current area may be it can cause this kind of error
>
>Hope this help...

tried that -- still doesn't work.

here is the current code -- all table insertions work except for pubs...
local lnFY, lcFull_Grant_Num, lnAppl_ID

lnFY = appls.fy
lcFull_Grant_Num = appls.full_grant_num

*- get lnAppl_ID
*- routine identical to fill_activity in po_cgms stored procedure

if !used('uniqueid')
	use po_cgms!uniqueid in 0
endif
select uniqueid
local llLock	&& local limited lock
llLock = .f.
do while !llLock
if rlock()
	llLock = .t.
	lnAppl_ID = uniqueid.idnumber
	replace idnumber with idnumber - 1
	unlock
endif
enddo

*- now add records
insert into po_cgms!act_link (appl_id, fy, full_grant_num, activity, meth_code, ;
	org_code3, org_code2, org_code, goal_code, stage_code, cat_code, sub_code) values ;
	(lnAppl_ID, lnFY, lcFull_Grant_Num, 0, 0, '00', '00', '00', 0, 0, 0, 0)
skip -1
insert into po_cgms!pubs (appl_id) values (lnAppl_ID)
insert into po_cgms!minority (appl_id) values (lnAppl_ID)
insert into po_cgms!progress (appl_id) values (lnAppl_ID)
select act_link
skip
return FILE_EOF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform