From: Eckhard Sallermann on 2 Sep 2008 03:32 now, when using flock() in clipper before appanding a record to the dbf and uing dbunlock after writing a record it seems to work, no error . . . . "Eckhard Sallermann" <ecki(a)bur-kg.de> schrieb im Newsbeitrag news:g9ipe0$ioc$1(a)registered.motzarella.org... > Hi Stephen, > > the clipper app and the vo app use the same memoblock size of 64 > it doesn�t matter wich app creates the database files ( DBF + FPT ) > > the clipper app crashes with an comix error: > > 1011 a write wich should have worked failed > this would occur if the media failed, or if a physical lock on the region > existed > Default rdd is: clipper = COMIX , VO = DBFCDX > > > "Stephen Quinn" <stevejqNO(a)SPbigpond.AMnet.au> schrieb im Newsbeitrag > news:mq5vk.33088$IK1.14483(a)news-server.bigpond.net.au... >> Eckhard >> >> Check _SET_MEMOBLOCKSIZE (RDDInfo(),RDDSetDefault()) as well. >> >> Also which app created the DBFs, any error codes for what failed in your >> attempts to get this working so far. >> >> CYA >> Steve >> > >
From: Stephen Quinn on 2 Sep 2008 08:25 Eckhard > the clipper app crashes with an comix error: > 1011 a write wich should have worked failed http://www.ghservices.com/gregh/clipper/ie52.htm How many records are in the DBF?? What's the filesize of the FPT file?? Over the network or local machine?? Show us the index expressions used - if they contain functions, do those functions exist in both environments > it doesn�t matter wich app creates the database files ( DBF + FPT ) It will if the incorrect ANSI/OEM settings are used in VO. CYA Steve
From: Eckhard Sallermann on 2 Sep 2008 08:42 sorry, i can not attach a file, so i must put the code here as plain text Drive R: ist a mapped drive on a Novel 5 Server it seems, using flock() works fine but rlock() doesn�t work The following code ist the Clipper 5.2e code ############################################### REQUEST COMIX set scoreboard off set exclusive off set confirm on set bell off set talk off set safety off set date german set date format to "dd.mm.yyyy" set decimals to 4 setcursor(0) set wrap on set century on set deleted on RddSetDefault("COMIX") clear screen // a := cmxmemoblock() == 64 cfile := "R:\ablage\89\test.dbf" if !file( cfile ) ferase( "r:\ablage\89\testidx.cdx" ) adbf := {} aadd( adbf , { "AMEMO" , "M" , 10 , 0 } ) aadd( adbf , { "NUMMER" , "N" , 10 , 0 } ) dbcreate( cfile , adbf , "COMIX" ) endif close all use ( cfile ) new shared alias tmpdat if !file( "r:\Ablage\89\testidx.cdx" ) index on str(nummer,10) to r:\ablage\89\testidx endif set index to r:\ablage\89\testidx ntotal := 100000 for noft := 1 to ntotal @ 10,10 say ltrim(str( noft * 100 / ntotal ,6,2)) dbappend() while !flock() enddo replace nummer with recno() replace amemo with "This is Nummer " + ltrim(str(noft)) + " " + replicate("X",500) + CRLF + ; "Comes from Clipper !!!" dbunlock() next noft quit The following code ist the vo-code ############################################### SetAnsi(FALSE) SetCollation(#CLIPPER) SetInternational(#CLIPPER) SetExclusive(FALSE) Set Date german SetDateCountry(GERMAN) SetDateFormat("DD.MM.YYYY") SetCentury(TRUE) SetDeleted( FALSE ) Set memoblock to 64 RddSetDefault("DBFCDX") SetNatDLL("GERMAN.DLL") ConcurrencyControl is CCNONE METHOD pbtest() CLASS winmain local adbf as array local odbtemp as mydbserver local noft as dword if !File( "R:\ablage\89\test.dbf") adbf := {} AAdd( adbf , { "NUMMER" , "N" , 10 , 0 } ) AAdd( adbf , { "AMEMO" , "M" , 10 , 0 } ) DBCREATE( "R:\ablage\89\test" , adbf , "DBFCDX" ) endif odbtemp := dbserver{ "R:\ablage\89\test" , DBSHARED , DBREADWRITE , "DBFCDX" } odbtemp:SetIndex("R:\ablage\89\testidx") for noft := 1 upto 100000 ApplicationExec( EXECWHILEEVENT ) odbtemp:append() while !odbtemp:FLOCK() enddo odbtemp:FIELDPUT( #nummer , noft ) odbtemp:FIELDPUT( #amemo , "Write anything in the memo field, this is number: " + LTrim(Str(noft)) + CRLF + ; "this comes from VO !!!" ) odbtemp:Unlock() next noft odbtemp:Close() return nil "Stephen Quinn" <stevejqNO(a)SPbigpond.AMnet.au> schrieb im Newsbeitrag news:7havk.33152$IK1.20372(a)news-server.bigpond.net.au... > Eckhard > >> the clipper app crashes with an comix error: >> 1011 a write wich should have worked failed > http://www.ghservices.com/gregh/clipper/ie52.htm > > How many records are in the DBF?? > What's the filesize of the FPT file?? > Over the network or local machine?? > > Show us the index expressions used > - if they contain functions, do those functions exist in both > environments > >> it doesn�t matter wich app creates the database files ( DBF + FPT ) > It will if the incorrect ANSI/OEM settings are used in VO. > > CYA > Steve >
From: Stephen Quinn on 2 Sep 2008 09:49 Eckhard See comment inline > The following code ist the Clipper 5.2e code > ############################################### > > REQUEST COMIX > > set scoreboard off > set exclusive off > set confirm on > set bell off > set talk off > set safety off > set date german > set date format to "dd.mm.yyyy" > set decimals to 4 > setcursor(0) > set wrap on > set century on > set deleted on > RddSetDefault("COMIX") > > clear screen > > // a := cmxmemoblock() == 64 > > cfile := "R:\ablage\89\test.dbf" > if !file( cfile ) > ferase( "r:\ablage\89\testidx.cdx" ) > adbf := {} > aadd( adbf , { "AMEMO" , "M" , 10 , 0 } ) > aadd( adbf , { "NUMMER" , "N" , 10 , 0 } ) > dbcreate( cfile , adbf , "COMIX" ) > endif > close all > use ( cfile ) new shared alias tmpdat > if !file( "r:\Ablage\89\testidx.cdx" ) > index on str(nummer,10) to r:\ablage\89\testidx > endif // > set index to r:\ablage\89\testidx // The line above line isn't required when using CDX as it'a structural index and // will be automaticaly opened/used when the database is used // IIRC it means your opening the index twice and that could be the cause of the error your seeing > ntotal := 100000 > for noft := 1 to ntotal > @ 10,10 say ltrim(str( noft * 100 / ntotal ,6,2)) > dbappend() // > while !flock() // > enddo > replace nummer with recno() > replace amemo with "This is Nummer " + ltrim(str(noft)) + " " + > replicate("X",500) + CRLF + ; > "Comes from Clipper !!!" dbCommit() dbUnlock() > next noft > quit > The following code ist the vo-code > ############################################### > > SetAnsi(FALSE) > SetCollation(#CLIPPER) > SetInternational(#CLIPPER) > SetExclusive(FALSE) > Set Date german > SetDateCountry(GERMAN) > SetDateFormat("DD.MM.YYYY") > SetCentury(TRUE) > SetDeleted( FALSE ) > Set memoblock to 64 > RddSetDefault("DBFCDX") > > SetNatDLL("GERMAN.DLL") > > ConcurrencyControl is CCNONE > > METHOD pbtest() CLASS winmain > local adbf as array > local odbtemp as mydbserver > local noft as dword > > > if !File( "R:\ablage\89\test.dbf") > adbf := {} > AAdd( adbf , { "NUMMER" , "N" , 10 , 0 } ) > AAdd( adbf , { "AMEMO" , "M" , 10 , 0 } ) > DBCREATE( "R:\ablage\89\test" , adbf , "DBFCDX" ) > endif > odbtemp := dbserver{ "R:\ablage\89\test" , DBSHARED , DBREADWRITE , > "DBFCDX" } // Again the following line is NOT required when using DBFCDX > odbtemp:SetIndex("R:\ablage\89\testidx") > > for noft := 1 upto 100000 > ApplicationExec( EXECWHILEEVENT ) > odbtemp:append() // > while !odbtemp:FLOCK() // > enddo > odbtemp:FIELDPUT( #nummer , noft ) > odbtemp:FIELDPUT( #amemo , "Write anything in the memo field, this is > number: " + LTrim(Str(noft)) + CRLF + ; > "this comes from VO !!!" ) odbtemp:Commit() odbtemp:Unlock() > next noft > odbtemp:Close() > return nil When using DBFCDX (applies to Clipper & VO) you should only ever use SetIndex() when you expressly turn OFF AUTOOPEN (See VO help on RDDSetDefault()/RDDInfo() ) Set( _SET_AUTOOPEN, FALSE ) - it's TRUE by default Primarily you would use SetOrder() CYA Steve
From: Eckhard Sallermann on 2 Sep 2008 10:24 "Stephen Quinn" <stevejqNO(a)SPbigpond.AMnet.au> schrieb im Newsbeitrag news:Fvbvk.33166$IK1.3867(a)news-server.bigpond.net.au... > Eckhard > > See comment inline >> The following code ist the Clipper 5.2e code >> ############################################### > > // > set index to r:\ablage\89\testidx > // The line above line isn't required when using CDX as it'a structural > index and > // will be automaticaly opened/used when the database is used > // IIRC it means your opening the index twice and that could be the cause > of the error your seeing okay, you are right, it isn�t nessesery, but i think you are wrong with your statement that the index is opened again as i see on the monitor.nlm on the novel server, the index is not openened twice, it will only be reopened. in think the problem is the rlock() wich will not work, using flock() instead will work fine
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: SQL record locking Next: Vo2Ado Sql Server Adding Constraint |