Hi All,
I am new to Emergence Basic and can't wait to get my feet wet. I was an owner of Paul's Ibasic and did some database work with it. I just recently purchased Emergence and now again I want to start playing with database work. I have been looking at the database code and it seems that a lot of the code could be developed with a skeleton type file or an actual code writer with all the database tables and fields defined in a simple data entry sheet.
My question today is can some one give me a simple sample on how to write a multi-line string out to a file? This would be a great help in getting me started on this project.
Thanks
Jim Richards
Why Hackmeister? I once (in the 80's) owned a computer store in Salem NH that I named Hackers Haven. The primary focus of the store was used computer equipment. I was a system/network administrator in the 90's and have always considered myself a hack.
Jim -
Here's one simple way to write multiple strings to a file (compile as console app):
' Output multiple strings to a file
DEF outfile AS FILE
DEF s1$ AS string
DEF s2$ AS string
DEF s3$ AS string
s1$ = "This is line 1."
s2$ = "This is line 2."
s3$ = "This is line 3."
IF OPENFILE(outfile, "testfile.txt", "W") = 0
WRITE outfile, s1$
WRITE outfile, s2$
WRITE outfile, s3$
CLOSEFILE outfile
ENDIF
END
Hope that helps get you started. You can view the result with notepad.
<*> Jim
You can find in EBasic folder ,folder projrcts.
In this folder you will find folder Database samples.
I hope this will help you ;)
regards
zlatko
Thank You for your comments and suggestions they are all helpful. Here is a screenshot of what I think might work in providing the definitions for the database. Once you have the definitions a lot of the code can be generated from this.
Link to Screen Shot: http://drdoall.com/EBdev/database_definitions.jpg (http://drdoall.com/EBdev/database_definitions.jpg)
Thanks
Jim Richards
Hi Jim,
Have you written your database code generation program yet. Your screen shot looks like you were well underway.
I use the VisData addin for VB to create and modify my databases.