DESCRIBE is not a SQL command, it's a SQL+ command IIRC. The Oracle ODBC drivers don't know anything about "DESCRIBE", because it's not a SQL command. (Warning - based on recollections of two years ago when I actually *worked* for a living)
----- Original Message ----- From: "Thomas R Wyant_III" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 25, 2002 8:45 AM Subject: Re: Win32::ODBC Question (Oracle) > > [EMAIL PROTECTED] wrote: > > > I'm trying to get Information about a spezific table in an Oracle > > with the command > > > 'describe table_name; ' > > > This command works within SQL-PLus and other Tools but I get the > > error message: "Ora-00900: invalid SQL statement" when I use it > > within a perl-script using a Win32::ODBC connection. > > > Does someone know a solution , maybe to use a DBD, DBI module or > > a different statement to get information about the table definition? > > You don't say what information you want about the table. If you want to > know what columns are in the table, and what data types are in the columns, > you perform a select against the table, and then pull the data out of the > selection results. If you don't want any data at this point, the usual > dodge is to specify a "where" clause that is never satisfied. In fact, the > usual dodge is > > select * from your_table where 1 = 0 > > I don't know of any better way under DBI, but you need to know less about > your data types if you use DBI, because it supports placeholders. So > instead of generating the entire text of a query, and worrying about > whether values need to be quoted, and if so how to escape any embedded > quotes, you just put a question mark in the query, and provide the value > when the query is executed. > > Tom Wyant > > > > This communication is for use by the intended recipient and contains > information that may be privileged, confidential or copyrighted under > applicable law. If you are not the intended recipient, you are hereby > formally notified that any use, copying or distribution of this e-mail, > in whole or in part, is strictly prohibited. Please notify the sender > by return e-mail and delete this e-mail from your system. Unless > explicitly and conspicuously designated as "E-Contract Intended", > this e-mail does not constitute a contract offer, a contract amendment, > or an acceptance of a contract offer. This e-mail does not constitute > a consent to the use of sender's contact information for direct marketing > purposes or for transfers of data to third parties. > > Francais Deutsch Italiano Espanol Portuges Japanese Chinese Korean > > http://www.DuPont.com/corp/email_disclaimer.html > > > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs