Hi all,
I am migrating the databases from Foxpro to Postgress using JDBC.
I am extracting all the field values,type and width from the
Foxpro database and putting that as a string .
Ex: String stru
Name varchar(20),id int4(4)
And then I have another string 'Query' which says
create table table_name( stru).
I am getting Error:Parser error at or near "(".
This is because of the brackets for the width.
If I don't specify the width, then I am able to create the table with
the default width for the respective type.I am using the
PreparedStatement .
(i.e)
PreparedStatement pst =con.preparestatement(Query);
pst.executeUpdate();
Please help me out with this. It's urgent.
Arathi.
> I am migrating the databases from Foxpro to Postgress using JDBC. > > I am extracting all the field values,type and width from the > Foxpro database and putting that as a string . > > Ex: String stru > > Name varchar(20),id int4(4) int4 doesn't need a size...it's always 4 bytes, AFAIK. So it should be: Name varchar(20), id int4 --Jeremy
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера