Depending on the database you are using, tablename can be case sensitive so check your spelling and case. Also make sure you are querying the right schema/database. You may have to use schema.table instead of table if that table is not in that user's schema or you will need to connect to the database/schema that table is part of.
> I am getting > > no such table: <tablename> > > error. > > > > I seem to be able to connect fine. > > Just cannot prepare a query : > > $query_handle = $DBIconnect->prepare($query) > or die "...bad qh: $DBI::errstr\n\n"; >