BBS: Inland Empire Archive
Date: 06-18-92 (02:33)             Number: 821
From: RON BAKER                    Refer#: NONE
  To: CONNON WALTERS                Recvd: NO  
Subj: DBase                          Conf: (2) Quik_Bas
* Message originally created at 1:236/22

 If you use the Code Below to make your DataBase it will be D-Base Compadable


- 'DBCREATE.BAS, creates a DBF file DEFINT A-Z '$INCLUDE: 'dbf.bi' '$INCLUDE: 'dbaccess.bi' CLS LOCATE , , 1 LINE INPUT "Enter DBF name: "; DBFName$ IF INSTR(DBFName$, ".") = 0 THEN DBFName$ = DBFName$ + ".DBF" END IF DO INPUT "Enter number of fields"; TFields IF TFields <= 128 THEN EXIT DO PRINT "Only 128 fields are allowed" LOOP REDIM FldStruc(1 TO TFields) AS FieldStruc FOR X = 1 TO TFields CLS DO PRINT "Field #"; X LINE INPUT "Enter field name: ", Temp$ IF LEN(Temp$) <= 10 THEN EXIT DO PRINT "Field names are limited to 10 characters" LOOP FldStruc(X).FName = Temp$ PRINT "Enter field type (Char, Date, Logical, Memo, "; PRINT "Numeric (C,D,L,M,N): "; DO Temp$ = UCASE$(INKEY$) LOOP UNTIL INSTR(" CDLMN", Temp$) > 1 PRINT FldStruc(X).FType = Temp$ FldType = ASC(Temp$) SELECT CASE FldType CASE 67 'Character DO INPUT "Enter field length: ", FldStruc(X).FLen IF FldStruc(X).FLen <= 255 THEN EXIT DO PRINT "Character field limited to 255 characters" LOOP CASE 78 'Numeric DO INPUT "Enter field length: ", FldStruc(X).FLen IF FldStruc(X).FLen <= 19 THEN EXIT DO PRINT "Numeric field limited to 19 characters" LOOP DO INPUT "Enter number of decimal places: ", FldStruc(X).Dec IF FldStruc(X).Dec < FldStruc(X).FLen THEN EXIT DO PRINT "Too many decimal places" LOOP CASE 76 'Logical FldStruc(X).FLen = 1 CASE 68 'Date FldStruc(X).FLen = 8 CASE 77 FldStruc(X).FLen = 10 END SELECT NEXT CALL CreateDBF(DBFName$, FldStruc()) PRINT DBFName$; " created"
-- I have some Code to Read DBase, Edit DBase or what ever you would like to do If you ever run in to any that will let your REad Clarion Let me Know. --- OPMED 3.00 * Origin: -={ Back_Woods BBS }=- (1:236/22)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET