Discussion Locked

Com port printing in PowerBuilder 7

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a program originally written in PowerBuilder 5.0 that uses the PrintSend command to print to an Automark tag machine. It worked fine but when we upgraded to PowerBuilder 7.0 the PrintSend command no longer worked.

I can get it to print using just a print command but I cannot get it to do a line feed. Everything keeps printing over the top of itself.

Here is the original code used in PB5:
gs_tagposition ="X111222"

PrintSend(li_tag, Char(27) + gs_tagposition[i2])
PrintSend(li_tag, ls_tempstring)
PrintClose(li_tag)

The problem is the tag machine has to have the x and y coordinates sent to it in this format "X111222" with the first three numbers being the x position and the last three the y position.

The only reason for the upgrade was because we kept getting the following message. "The instruction at 0xBFF7B30B referenced memory at 0x0000006. The memory could not be written." When I checked the system info that memory is being used by the system board extensionsfor PnP BIOS.

If anybody can help me with either problem I would appreciate it.

5 replies

by jmcquilling

No immediate answer but some questions
1) If the app was working and then started giving the memory error did something change just before that?

2) The code fragement appears to be incomplete. You should be changing the position value for each line. The code

gs_tagposition ="X111222" implies that gs_tagposition is a string

but this code in indexing into an array.

PrintSend(li_tag, Char(27) + gs_tagposition[i2])

I might be able to help with more data.

by jamesa

Although they were good suggestions I had already tried all of these. Thanks for the help though.

by conrad

"Knowledge is the small part of ignorance that we arrange and classify."

-- Ambrose Bierce

This discussion is closed to new replies.