Albert, Sami, Mike
thanks for your help. It does what I want.
Mike, there are LabelPrinter, ReceitPrinter, InkJetPrinter at the
POS-Workstation. So different reports are printed on different printers. I
dont want the user has to choose printers before printing. Once after the
application is installed he has to define the printers for the different
tasks and that is done by some ComboBoxes.
Armin
----- Original Message -----
From: "Albert Berry" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Wednesday, June 22, 2005 11:45 PM
Subject: [RBG7-L] - Re: PrinterNames in a table
I misread your original posting, sorry. You need to put the values in one
by one. You can do this
in a short command file using a loop to parse out the printer names.
-- Assumes that vPriList is already populated, such as
'Printer1,Printer2,Printer3'
SET VAR vPriList TEXT = (CVAL('Printers'))
SET VAR vPrinter TEXT
SET VAR vCount INTEGER = (ITEMCNT(.vPriList))
WHILE vCount > 0 THEN
SET VAR vPrinter = (SSUB(.vPriList,.vCount))
INSERT INTO AllPrinters (PriNames) VALUES (.vPrinter)
SET VAR vCount = (.vCount - 1)
ENDWHILE
SELECT * FROM AllPrinters
RETURN
--- ArminThoma <[EMAIL PROTECTED]> wrote:
Albert
INSERT INTO AllPrinters (PriNames) VALUES (&vPriList)
brings -ERROR- Columne or variable ... not found
-ERROR- Syntax is incorrect for the command INSERT
Any other idea?
Armin
----- Original Message -----
From: "Albert Berry" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Wednesday, June 22, 2005 8:43 PM
Subject: [RBG7-L] - Re: PrinterNames in a table
> Try the following. Note the spaces and braces <G>
>
> INSERT INTO ..... VALUES ( &vPriList )
>
> --- ArminThoma <[EMAIL PROTECTED]> wrote:
>
>> Hi al
>>
>> I want to show all the printernames in a DB ComboBox.
>> With (CVAL('printers')) I can build the variable vPriList with
>> (printer1,
>> printer2, ...).
>>
>> What's the best way to put these printernames into the table
>> AllPrinters
>> with the column
>> PriNames?
>>
>> I tried INSERT INTO ..... VALUES &vPriList. But no success.
>>
>> Could anybody help?
>>
>> Armin
>
>
> Albert Berry
> Management Consultant
> RR2 - 1252 Ponderosa Drive
> Sparwood BC, V0B 2G2
> Canada
> (250) 425-5806
> (250) 425-7259
> (708) 575-3952 (fax)
> [EMAIL PROTECTED]
>
>
Albert Berry
Management Consultant
RR2 - 1252 Ponderosa Drive
Sparwood BC, V0B 2G2
Canada
(250) 425-5806
(250) 425-7259
(708) 575-3952 (fax)
[EMAIL PROTECTED]