I am having a problem with the following SQL
in a single statement:

my $sql = qq|create opaque type mytype (
internallength=variable, MAXLEN=512
);

GRANT usage on type mytype to user;
|;

my $dbh =
DBI->connect("dbi:Informix:$database_name","database_user","database_passwor
d");
if($DBI::err)
        print STDERR " Got DBI error: $DBI::errstr\n";
}
my $sth = $dbh->prepare($sql) if $dbh;
if($DBI::err)
        print STDERR " Got DBI error: $DBI::errstr\n";
}
$sth->execute() if $sth;
if($DBI::err)
        print STDERR " Got DBI error: $DBI::errstr\n";
}
$sth->finish() if $sth;
$dbh->disconnect() if $dbh;

This produces  the following error:

ERROR: -9628 'SQL: -9628: Type (mytype) not found.


If I split the sql into two statements
I do not have a problem.

Is there a way to get around this.

I am hoping to read in SQL files and process them to create a database
and all there types.

Thank you,
Korey Klier
--
Korey Klier           [EMAIL PROTECTED]
(919) 767-2177          www.mediaspangroup.com

Reply via email to