Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dbase III+ and Inkjet Printer Help Needed 1

Status
Not open for further replies.

play4gumbo

Technical User
Jul 11, 2004
2
US
My question concerns using Dbase III+ with an HP inkjet printer. We have been using an Okidata ML 591 until last week. I am not the programmer of the Dbase and have inherited it. Are there any good fixes so that we can continue to use the dbase file with an inkjet under Windows 98SE?

Also, I would like to move to a Windows database. I have some limited experience of Access 2000. Any suggestions on a database to use in place of dbase III+ files?

Thanks.

 
Since you haven't explained what your problem is with the inkjet printer, I'm going to assume that the printer uses a USB cable to connect to the computer, you run the program by booting to DOS (not a DOS window), and/or the program makes a specific call to LPT1. dBaseIII+ has no knowledge of USB devices and since the program makes a specific call to LPT1, nothing will print.

Two ways to fix this:

Find and change the line that sends data directly to LPT1 and run the program through a DOS window from the Windows operating system. This will send print jobs to the Windows print spooler rather than to a specifc port. Windows will handle it from there.

Get a printer that uses the normal PLT1 printer port.


Actually, the inkjet printer will cost you more money to use (in ink cartridges) than it would to buy a new laserjet printer. It doesn't make any monetary or business sense to use the inkjet for B&W printing. Inkjets are great if you need to print in color - and lots of it. Otherwise, you're going to drowned in inkjet cartridge costs. (Consider the cost of the cartridge - let's just say it's only $10.00. You won't print 500 pages before you have to change cartridges. A laser cartridge costs anywhere from $60.00 to $120.00 - and can easily print 10,000 pages. Do the math on the cartridge costs alone and it's a no-brainer.)


Now, as far as a Windows database. There are a lot of them and it all depends on what you want to do and what you already know. If you're comfortable with the dBase panguage, go to Visual Foxpro - the transition will be pretty easy. If you're comfortable with Access, go for it!

There's always a better way. The fun is trying to find it!
 
tviman,

Thanks for the tips. I agree about the laser printer. At my location all we have are inkjets and a Okidata ML 591. If I can make the dBase III+ work with the USB injet then I will have the company purchase the laser. We have been using the ML 591 for the dBase III+ program. I would like to switch to a laser using a USB port.

I am new to dbase since losing the person who wrote the original program. Could you please explain your response (Find and change the line that sends data directly to LPT1 and run the program through a DOS window from the Windows operating system. This will send print jobs to the Windows print spooler rather than to a specifc port. Windows will handle it from there)in more detail?

I have found the printer instructions files. I have found several files tht deals with the printer commands. These may be the wrong files but the excerpts dealing with print commands are below. The first is:

*PRNTRPRT.PRG
*TEMPLATE to print Ingfdres, Tissres, Wawares, Misclere reports

* Set operating conditions to print

* SET CONSOLE OFF

SET DEVI TO PRIN

* Set printer to 8 lines per inch and 12 pitch

SET PRIN ON
??CHR(27) + "0"
??CHR(27) + "M"
SET PRIN OFF


and another has the folowing lines:

READ
set print on
set device to print
clear

EJECT
CLEAR
set device to screen
set print off
ejec

and another file that instructs the printer:

SET PAPER PARAMETERS HERE
SET PRIN ON
??CHR(27) + "0"
??CHR(27) + "M"
SET PRIN OFF

Set Device to print

And another:


* SET OPERATING CONDITIONS
* SET PRINT OFF
* SET DEVI TO SCRE
* SET TALK OFF
* SET STAT OFF


* STORE " 13 5 24" TO mvalid
* STORE "1. PRINT ALL COMPLETED REPORTS PRNTREDY" TO moption1
* STORE "2. PRINT INDIVIDUAL LAB REPORTSPRNTEACH" TO moption2
* STORE "3. RETURN TO LABDATA MENU LABDATA " TO moption3

* moldrow = 1
* mnewrow = 1
* moldopt = "moption1"
* mnewopt = "moption1"

* HEADER

* DO WHILE .T.

* @ 1,17 SAY "LABORATORY REPORT MENU"
* @ 3,10 SAY SUBSTR(moption1,1,31)
* @ 4,10 SAY SUBSTR(moption2,1,31)
* @ 5,10 SAY SUBSTR(moption3,1,31)
* @ 7,10 SAY "UP/DOWN ARROW TO CHANGE OPTIONS"
* @ 8,10 SAY "HIT RETURN TO EXCECUTE THE OPTION"
* @11,10 SAY "PRINTER INSTRUCTIONS:"
* @12, 1 SAY "Set the printer options as follows:"
* @13, 1 SAY "+LPI 8 LANG 0"
* @14, 1 SAY "+CPI 10 +PG LEN 11"
* @15, 1 SAY "EMP N +SOP N"
* @16, 1 SAY "ENH N AUTO LF N"
* @17, 1 SAY "D.W. N POD N"
* @18, 1 SAY "+PR MODE CQ APA-UNI N"
* @19, 1 SAY "CH SET SET 1 PORP SP N"
* @20, 1 SAY "PR REG 0"
* @22, 1 SAY "Set the left perforation on the 1 on the platen"
* @23, 1 SAY "Set the top of page just above the platen"

* REMOVE HIGHLIGHT FROM OLD OPTION, HIGHLIGHT NEW ONE, CHOOSE PROGRAM

* @ 2+moldrow,10 SAY SUBSTR(&moldopt,1,31)

* SET COLOR TO N/W
* @ 2+mnewrow,10 SAY SUBSTR(&mnewopt,1,31)
* SET COLOR TO

* mprogram = TRIM(SUBSTR(&mnewopt,32,8))

* VALID KEYPRESS

* mkeyval = 0

* DO WHILE .NOT. STR(mkeyval,3)$mvalid
* mkeyval = INKEY()
* ENDDO

* EXECUTE OPTION

* DO CASE

* UP ARROW

* CASE mkeyval = 5

* moldrow = mnewrow
* mnewrow = IIF(mnewrow=1,3,mnewrow-1)

* DOWN ARROW

* CASE mkeyval = 24

* moldrow = mnewrow
* mnewrow = IIF(mnewrow=3,1,mnewrow+1)

* EXECUTE OPTION

* CASE mkeyval = 13

* CLEAR
* CLOSE ALL
* DO &mprogram

* ENDCASE

* moldopt = "moption" + STR(moldrow,1)
* mnewopt = "moption" + STR(mnewrow,1)

* ENDDO
Set console off
Clear

Thanks for any advice.
 
Unfortunately, your printing instructions and parameters are designed for the Okidata printer and will not work for the inkjet printers - or a laser printer. The program is setting specific font parameters that are printer specific.

Is there any reason why you can't continue to use the Okidata printer?

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top