fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

DBCreate 09 Nov 2020 07:36 #16538

  • Horst's Avatar

  • Horst

  • Topic Author


  • Posts: 172
  • Hallo
    i try to create a DB . On the memofield it stops. What do i wrong? This work on VO

    aStruct := { ;
    { "IS_FAKTURA","L",1,0 } ,; // LIEFERSCHEIN IST IN EINER RECHNUNG AUFGEFÜHRT
    { "FARBE","C",20,0 } ,;
    { "Id_Liefer" , "C" , 15 ,0 } ,; // LIEFERSCHEIN ID
    { "GEWICHT","C",20,0 } ,;
    { "ID_ARTIKEL","C",10,0 } ,;
    { "BESTELL_NR","C",20,0 } ,;
    { "ARTIKEL1","C",60,0 } ,;
    { "ARTIKEL2","C",30,0 } ,;
    { "ARTIKEL3","C",30,0 } ,;
    { "PRB","N",15,2 } ,;
    { "EINHEIT","C",20,0 } ,;
    { "MWSTSATZ","N",5,2 } ,;
    { "MENGE","N",9,3 } ,;
    { "RAHMENNR","C",40,0 } ,;
    { "MEINTEXT","M",0,0 } ,;
    { "FFONT","C",3,0 } ,;
    { "BLOCKTOTAL","C",30,0 } ,;
    { "DIMENSION","C",30,0 } ;
    }

    // DBCREATE(cTempFile,aStruct,"DBFCDX",,,,)
    DO WHILE TRUE
    IF DbCreate(cTempFile,aStruct,"DBFCDX",,,,)

    Beschreibung : Field 'MEINTEXT' is not valid
    Subsystem : DBFCDX
    Generischer Code : EG_ARG Argumentfehler
    Untercode : 1113 Datenbank-Header korrupt
    FuncSym : ValidateDbfStructure
    Schwere : ES_ERROR
    Kann Default : False
    Kann erneut versuchen : False
    Kann ersetzen : False
    Aufrufreihenfolge :
    bei XSharp.RDD.DBF._checkFields(RddFieldInfo info)
    bei XSharp.RDD.Workarea.AddField(RddFieldInfo info)
    bei XSharp.RDD.DBF.AddField(RddFieldInfo info)
    bei XSharp.RDD.Workarea.CreateFields(RddFieldInfo[] aFields)
    bei XSharp.CoreDb.<>c__DisplayClass35_0.<Create>b__0()
    bei XSharp.CoreDb.Do[T](Func`1 action)
    bei XSharp.CoreDb.Create(String cName, RddFieldInfo[] aStruct, Type rddType, Boolean lNew, String cAlias, String cDelim, Boolean lKeep, Boolean lJustOpen)
    bei XSharp.CoreDb.<>c__DisplayClass33_0.<Create>b__0()
    bei XSharp.CoreDb.Do[T](Func`1 action)
    bei XSharp.CoreDb.Create(String cName, RddFieldInfo[] aStruct, String cRddName, Boolean lNew, String cAlias, String cDelim, Boolean lKeep, Boolean lJustOpen)
    bei XSharp.RT.Functions.DbCreate(__Usual[] Xs$Args)
    bei _Swissbase-Functionen.Functions.CreateAufTemp(String cIDC_PathTmp, String gcUserId) in C:\XIDE\Projects\Swissbase\Applications\_Swissbase-Functionen\Shared Auftrag.prg:Zeile 135.

    Horst

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 08:05 #16539

  • wriedmann's Avatar

  • wriedmann


  • Posts: 2451
  • Hi Horst,
    for the fieldtype "M" you cannot indicate a field width of 0.
    VO ignores this, but X# requires the correct indication of 10.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 08:10 #16540

  • Chris's Avatar

  • Chris


  • Posts: 2258
  • Hi Horst,

    That's because of the MEMO field, you have specified a length of 0, while this should be 10. But I see that indeed VO works also with zero, apparently it ignores the length you specify and always uses the correct one. WIll log this a a compatibility problem, thanks!

    Edit: Well, what Wolfgang said already! :)
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Last edit: by Chris.

    DBCreate 09 Nov 2020 08:27 #16541

  • Horst's Avatar

  • Horst

  • Topic Author


  • Posts: 172
  • Hallo
    Thanks, so i will put 10.

    btw why put a length ? its a memofield ;-)

    Horst

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 08:29 #16542

  • robert's Avatar

  • robert


  • Posts: 1980
  • Horst,

    Horst wrote: Hallo
    Thanks, so i will put 10.

    btw why put a length ? its a memofield ;-)

    Horst

    We now also support the new FoxPro Memo field which has a width of 4 (it stores the block address as an integer and not as ascii).
    So we need to know which type you want.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 08:49 #16544

  • Horst's Avatar

  • Horst

  • Topic Author


  • Posts: 172
  • Hi Robert

    Mmm you can see it on the dialect switch i am using ?
    btw its written XSharp.RT (in XSharp.RT.dll) Version: 2.6 , so dbcreate () doesnt need a vo dll ??
    Horst

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 09:02 #16545

  • robert's Avatar

  • robert


  • Posts: 1980
  • Horst,
    I'll change the RDD system to look at the type of RDD and adjust the column width automatically.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 09:24 #16547

  • Chris's Avatar

  • Chris


  • Posts: 2258
  • Hi Horst,

    The XSharp.VO library is very small, only contains a few functions (like Crypt()) and types (like VObject and OleAutoObject) which are specific to VO dialect apps. All the main runtime functionality is implemented in XSharp.Core and XShar.RT, so some VO dialect apps (that do not use the VOSDK) do not even need XSharp.VO at all.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 09:39 #16549

  • Horst's Avatar

  • Horst

  • Topic Author


  • Posts: 172
  • i have a question.
    Xsharp shoud be the new xbase language for .net
    so the goal shoud be , that all people is slowly switched to the core dialect. and all other like Vo, Foxpro and Harbor shoud be supported for old programs.
    my question, is it possible to rewrite my app without any compromise ? so i can use the core dialect and a dbf database. and i dont like also this x86 radiobutton (sounds so old, like i make apps on a win95 computer ;-) )
    i hope folks you understand what i am asking about.
    what i need as a beginner in X#, is a app like ssatutor in pure X#.
    Horst

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 10:05 #16551

  • wriedmann's Avatar

  • wriedmann


  • Posts: 2451
  • Hi Horst,
    let me try to answer: with VO, the life was relatively simple as there were only the VO GUI classes as GUI choice, and DBF databases were the best option.
    With pure X#, you have the choice between Windows Forms and WPF, and you have the choice if using MVVM or not (for WPF it seems the best option, whereas in the older Windows Forms world it does not seem to be so used).
    What should such a sample application use? And what type of database? These days I would see DBF only as niche database, and any sort of SQL databases as mainstream.
    I agree that such a sample application could help a lot, and I thought many times I should provide one, but was always missing the time.
    But maybe now that we again have a "hard" lockdown (here in South Tyrol we cannot exit anymore freely as our hospital capacities are exhausted) maybe I will have some time for such a project.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 10:24 #16552

  • Horst's Avatar

  • Horst

  • Topic Author


  • Posts: 172
  • Hi Wolgang
    what i see is, that dbf as a database is good enough for a companie with 10 people. but why not a example on sql. i never used sql and i had also never problems with dbf. so i am honest i have no experiance. if u do it with dbf all the things you need is in X# . with sql u need a 3party product. and i allways had trouble after some years with 3party things.
    about window form. realy i dont know, what i see is, that in some (older?) apps the windows are normal and the icons close to unvisible.
    the ssatutor from vo was for me the entry point for vo after clipper.

    Horst

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 10:45 #16554

  • wriedmann's Avatar

  • wriedmann


  • Posts: 2451
  • Hi Horst,
    personally I see problems with DBF starting from 5 concurrent users.
    And I have customers with less than 5 concurrent users that are using filters massively and therefore DBF is not more a good choice.
    DBF is becoming not more adeguate because Microsoft in search of performance does much more client side caching leading to more data corruption, and on the other side user expectations have changed over the years.
    10 or 15 years ago an incremental search was a really good thing, but these days people seems to use filters, filters and filters, and that pushes DBF data to limits.
    I agree that 3rd party software over the years tends to be problematic, but I have some projects with Oracle, MySQL and MS SQL databases that are living for much more than 10 years.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 11:06 #16556

  • Chris's Avatar

  • Chris


  • Posts: 2258
  • Hi Horst,

    There's nothing wrong with using different dialects than Core. Personally I prefer the VO dialect, because it supports very helpful/powerful to me syntax, like being able to use both single and double quotes for string delimiters. The core dialect is closer to that of c#, but that does not make any better or worse. It's up to everybody to decide what suits them best.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 11:12 #16557

  • wriedmann's Avatar

  • wriedmann


  • Posts: 2451
  • Hi Horst,
    let me adding something to what Chris said about dialects: using the Core dialect may give you faster and better applications, but you will need more code because you loose weak typing and things like untyped arrays.
    I'm writing much Core dialect code, but I'm not completely happy with it - using the VO dialect programming is faster.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 11:26 #16559

  • Chris's Avatar

  • Chris


  • Posts: 2258
  • Hi Wolfgang,

    You do not get faster and better applications by using Core dialect and slower if you use other dialects, this only depends on what code you write. If you still use Lists and .Net collections in VO dialect, you will get exactly the same performance as you would have using them in Core.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 11:34 #16560

  • wriedmann's Avatar

  • wriedmann


  • Posts: 2451
  • Hi Chris,
    you are right, but I don't meant that.
    In the VO dialect you are allowed to use untyped arrays - in Core dialect you need to use lists.
    In the VO dialect you are allowed to write "dirty" code - the Core dialect does not permit that.
    In untyped arrays you can change them as you loop through them - with collections this is not so easy, unfortunately.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 11:36 #16561

  • Chris's Avatar

  • Chris


  • Posts: 2258
  • Hi Wolfgang,

    Yeah, in this sense I agree!
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 13:01 #16564

  • Horst's Avatar

  • Horst

  • Topic Author


  • Posts: 172
  • Chris, Wolfgang
    i like also the VO dialect. and Wolfgang i love the clipper array handling.
    but whats about the x86 switch ? its create's 32bit apps only ?
    so one day ..
    Horst

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 13:08 #16565

  • robert's Avatar

  • robert


  • Posts: 1980
  • Horst,
    The X# Runtime can run in both X86 and X64 mode.
    However the VO GUI classes and some other parts of the VO SDK classes were never designed to be used in x64 mode: they contain lots of "dangerous" casts between 32 bit numbers and pointers (which are 64 bits in x64 mode).
    So if your app uses VO GUI classes you are bound to x86 for now.
    We have worked on an 'anycpu' version of the VO GUI classes, but that is not finished yet.

    And w.r.t. your question about the Core dialect:
    if you plan to use the Core dialect then your code should be "clean".
    You started this thread with an example of a DbCreate with a 0 length for memo fields. This is not what I would call "clean code".

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    DBCreate 09 Nov 2020 13:24 #16567

  • Horst's Avatar

  • Horst

  • Topic Author


  • Posts: 172
  • Hi Robert
    I agree,
    but, once upon a time i got a sample to made a DBF. and there was a zero for the length of a memofield. and before i was opening this thread i was searching in the x# documentation for a example and did not found one. maybe i dont know how to look there and the answer is a little bit hidden.
    And zero for memofield is a logic value, because its a open size. i dont know whats behind the dbcreate function realy happends.
    Horst

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1
    • 2