Armin -

Try this:

SET V vPriList = (CVAL('Printers'))
SET V vCount INTEGER = 1
SET V vPrinter TEXT = 'xx'
WHILE vPrinter IS NOT NULL THEN
  SET V vPrinter = (SSUB(.vPriList,.vCount))
  INSERT INTO AllPrinters (PriNames) VALUES .vPrinter
  SET V vCount = (.vCount + 1)
ENDWHILE
RETURN

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sami Aaron
Software Management Specialists
913-915-1971
[EMAIL PROTECTED]
 
 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of ArminThoma
Sent: Wednesday, June 22, 2005 4:15 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: PrinterNames in a table

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]
>
> 

Reply via email to