Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with updatable cursor

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
Next problem:

I created a cursor in code.
Code:
CREATE cursor 'curTijdelijk2'(NCONT_ID I NOT NULL, ;
                          NGRAF_ID I NOT NULL, ;
                          NANTWFORM I NOT NULL, ;
                          DANTWDAT D NOT NULL, ;
                          NBEDRAG N(10, 2) NOT NULL DEFAULT 0.00, ;
                          NBEDRAGSRT I NOT NULL DEFAULT 999, ;
                          NSTARTJAAR I NOT NULL, ;
                          NAANTJAAR I NOT NULL, ;
                          LAG L NOT NULL, ;
                          COPMERK C(254) NOT NULL, ;
                          NSTATUS I NOT NULL, ;
                          CUSER C(20) NOT NULL, ;
                          TUPDATE T NOT NULL)
This cursor (curTijdelijk2) is updatable.
Than I created from that cursor another cursor with some outer joins to make it better to read (user must be able to select records).
Code:
			SELECT con.cFullName, PADR(combineer_no_space(gr.cvak,gr.crij,gr.cnummer,IIF(glGrafFinEntiteit = .F. , ALLTRIM(STR(gr.nLaag)), '*')), 8) as graf,;
					ct.nANTWFORM, ct.nBEDRAG, tar.cOmschrijf, ct.nSTARTJAAR, ct.nAANTJAAR, ct.lAG, ct.nSTATUS, ;
					ct.nCont_ID, ct.nGraf_ID, ct.nBedragSrt, ct.cOpmerk, ct.cUser, ct.tUpdate;               
				FROM curTijdelijk2 ct;
				left outer join vu_contactpers con;   
				ON ct.nCont_id = con.nCont_ID;
				LEFT OUTER JOIN vu_Graven gr;
				ON gr.nGraf_id = ct.nGraf_id;
				LEFT outer JOIN vu_tarief1 tar;
				ON tar.nSoort = ct.nBedragsrt;
				INTO CURSOR curTijdelijk
That cursor (curTijdelijk) is not updatable.
Can I make that one updatable?

Or is the only way to create another cursor (curTijdelijk3)and than insert all values form curTijdelijk?

-Bart
 
What version of VFP?
If VFP8 and 9 you could use READWRITE clause that makes your cursor updatatble:
Code:
SELECT .......
INTO CURSOR curTijdelijk READWRITE

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
VFP9
Going to give it a try Borislav.
As mostly....Such an easy solution ;-)
Anyway, Thanks for help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top