From: Korshunov Ilya Date: 2002-10-22T22:40:08+09:00 Subject: Re: Using variables in conn.exec (pgsql) � ��������� �� 22 ������� 2002 17:36 ts �������: > >>>>> "K" == Korshunov Ilya writes: > > K> res="CREATE TABLE ", username, " (id SERIAL, a char)" > > Well, here `res" will be an Array not a String. Probably you want `+' > rather than `,' > > K> result = conn.exec ($res) > > You use `$res', which is not initialized, rather than `res' > > > Guy Decoux [kosha@kosha rubye sample]$ ./create_table.ruby ./create_table.ruby:19:in `exec': wrong argument type Array (expected String) (TypeError) from ./create_table.ruby:19 from ./create_table.ruby:11:in `each_line' from ./create_table.ruby:11 from ./create_table.ruby:10:in `open' from ./create_table.ruby:10 [kosha@kosha rubye sample]$ Another error).....i think that res must be string but not array...or i mistaking ? -- WBR Korshunov Ilya