Hmm. Not much wrong there, apart from initialising @columns = "", which will set up the array to have a null string as its single element. Use @columns = ().
I'm suspicious about the bind_columns call, but since you're using a package I'm not familiar with I can't be sure. I'd suggest binding a few more significant columns and printing them in the fetch() loop so you can see what's going on. HTH Rob ----- Original Message ----- From: "Vincent Lee" <[EMAIL PROTECTED]> To: "Rob" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, October 16, 2002 9:41 PM Subject: Re: creating a string on the fly > Here's the code: > > sub GetColumns{ > my @columns=""; > $statement=uc("SELECT colname from > syscat.columns where tabname='$_[0]' and > tabschema='$sch' ORDER BY colno"); > $s=$dbHandle->prepare("$statement") or die > "Select error. Check the syntax\n"; > > $s-> execute() or die "error here."; > > $s->bind_columns(\$colname); > > while ($s->fetch()){ > push (@columns, $colname); > } > return @columns; > } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]