Re: Re: DB_Data_Object - cant create Objectfiles
| From: | Markus Wolff | Date: | Fri, 09 Apr 2004 13:15:42 +0000 |
| Subject: | Re: Re: DB_Data_Object - cant create Objectfiles | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11761@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
I had a quick look at the mssql driver - it appears to do SELECT * FROM {tablename} to get a single row to find out the types of the columns. I dont know mssql well enough to say if it is possible to simplify this (eg. by limiting or requesting a single row somehow..) - or if there is a better way to read the table structure - by doing something with syscolumns ???Dunno about syscolumns, but it would be best to limit the query to one row by writing... SELECT TOP 1 * FROM {tablename} ...to really fetch only the first row from the database. Another alternative might be to try the ODBTP extension instead of the MSSQL one, which should provide a better support for field type detection: http://odbtp.sourceforge.net/ CU Markus