Great example. Thanks. It works fine.
Question, with this RDD, using the DBedit, or Browse, what is the
recommended way of allowing a user to edit/change a record?
Do you look for a change event on the dbedit object?
Or do you look for a key press for editing and then give the user a
edit screen?
Again, thank you for the help.
Peter
On Apr 8, 4:56 am, Paul <
supp...@flagship.de> wrote:
> Would strongly suggest to check success. There is also semantic error
> in the USE command. See fixed example below.
> local ok, myFileName
> ok := MYDBOPEN("test", "localhost", "root", "melbrooks")
> if !ok
> alert("Could not open mySQL database 'test'")
> quit
> endif
> BEGIN SEQUENCE
> MYFILENAME:=MYQTODBF("select * from person")
> if empty(myFileName)
> BREAK
> endif
> ?"command executed"
> USE (MYFILENAME) SHARED // note parentheses
> if !used()
> alert("Could not open resulting database " + myFileName)
> quit
> endif
> if reccount() == 0
> alert("Note: The resulting database " + myFileName + " is
> empty")
> endif
> DbEdit() // browse database
> RECOVER
> ? "recover (line#" + ltrim(procline()) + ") could not
> execute select to dbf"
> wait
> END
>
> You also may compile the mySQL RDD source and your application with
> debugger (-d compiler switch) and then step thru.
>
> Hope this helps you.
> Paul