English
Forum

@dbIndex trouble

 

Georg
Hovenbitzer
Hello together,

I try straight the first times the DB functions of Profan To using and get always a Schutzverletzung in my code if under the Proc OpenDB The row @dbIndex(TITEL) active is.
at that write the times Datensatzes comes The Schutzverletzung, without whom @dbIndex commands runs the write through.
only becomes then nothing found.

has someone a hint I wrong make ?!
CompileMarkSeparation
Proc CreateDB

    Assign #4,"TITEL.STR"
    Rewrite #4
    Print #4,"TITEL;C;254;0"
    Close #4
    DbCreate "TITEL.STR" > "TITEL.DBF"
    Assign #4,"TITEL.STR"
    Erase #4
    @dbOpen(#5,"TITEL.DBF")
    @dbUse(#5)
    DbCreateIndex "TITEL" > "TITEL"
    @dbClose(#5)

EndProc

Proc OpenDB

    Case @FileExists("TITEL.DBF") = 0 : CreateDB
    @dbOpen(#5,"TITEL.DBF")
    @dbUse(#5)
    @dbIndex("TITEL")

EndProc

Proc PutDB

    Parameters Titel$
    @dbAppendBlank()
    @dbPut("TITEL",Titel$)
    @dbPutRec(0)

EndProc

Proc FindDB

    Parameters Titel$

    If @dbFind(Titel$,0) <> 0

        Return 1

    Else

        Return 0

    EndIf

EndProc

Declare Zeile$
Cls
OpenDB

WhileLoop 100

    Zeile$ = "Zeile" + @Str$(&Loop)
    Print Zeile$
    PutDB(Zeile$)

EndWhile

If FindDB("Zeile55") = 1

    Print "Test 1 gefunden"

Else

    Print "Test 1 nicht gefunden"

EndIf

If FindDB("Zeile_99") = 1

    Print "Test 2 gefunden"

Else

    Print "Test 2 nicht gefunden"

EndIf

WaitInput
DbCreateIndex "TITEL" > "TITEL"
@dbClose(#5s2>)
End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
06/06/06  
 




Georg
Hovenbitzer
Hello together,

I have the trouble found, its The Feldlänge
with of/ one length of 127 characters runs it by me, only wieso
in the Help standing nothing of it and the maximum Feldlänge lying Yes with 255 characters.
can this someone confirm.
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
06/06/06  
 




Michael
Wodrich
must You ausloten. DBase having the so resolved, the tappt im dunkeln the Dezimalstellenfeld too with using had. i don't know More whether the Clipper specific was or for all DBase-Derivate.

rather is it: 250 characters maximum and what larger is becomes into Memo stuffed.

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
06/07/06  
 




Georg
Hovenbitzer
Hello Michael,

250 characters wären Yes class, but More as 127 is not.
ex of/ one Feldlänge of 128 I get, if I dbindex use, a Schutzverletzung.
without dbindex works it with the filled length.
its too alike on which place I the dbindex einsetze, once this staid is and one data into DB writes comes after a couple Datensätzen one Error.
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
06/07/06  
 




RGH
Hi,

The Schlüssellänge in a Indexdatei (*.NDX) is in the doing of dBase-III-standard since on 127 characters terminable.
that is: If for index one area herangezogen becomes, must which Feldlänge 127 characters not beyond. go several boxes for index herangezogen, must The amount the Feldlängen nichr larger as 127 his.

If one now but a index on one more area needed, so is it gängige practice, as Matchcode one further area einzufügen, the in this drop about only the first 127 characters the more Field contains. the might for almost any tack enough his.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
06/07/06  
 




Michael
Wodrich
correctly., remember me again.

though was is in DBase too possible whom index a SubString to make up. the miss I unfortunately in Profan.

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
06/09/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

850 Views

Untitledvor 0 min.
Pauli05/17/13
Untitled02/18/11

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie