dabo Commit
Revision 6347
Date: 2011-01-26 07:07:12 -0800 (Wed, 26 Jan 2011)
Author: Uwe_Grauer
Trac: http://trac.dabodev.com/changeset/6347

Changed:
U   trunk/dabo/db/dbFirebird.py

Log:
Removed unused imports.
Changed type detection for blob fields.


Diff:
Modified: trunk/dabo/db/dbFirebird.py
===================================================================
--- trunk/dabo/db/dbFirebird.py 2011-01-25 13:50:00 UTC (rev 6346)
+++ trunk/dabo/db/dbFirebird.py 2011-01-26 15:07:12 UTC (rev 6347)
@@ -1,10 +1,8 @@
 # -*- coding: utf-8 -*-
-import datetime
+
 import re
 import dabo
-from dabo.dLocalize import _
 from dBackend import dBackend
-from dCursorMixin import dCursorMixin
 from dabo.lib.utils import ustr
 
 
@@ -144,9 +142,11 @@
                        pkField = rs[0]["column_name"].strip()
                except KeyError:
                        pkField = None
+               except IndexError:
+                       pkField = None
 
                # Now get the field info
-               sql = """  SELECT b.RDB$FIELD_NAME, d.RDB$TYPE_NAME,
+               sql = """  SELECT b.RDB$FIELD_NAME, d.RDB$TYPE_NAME, 
c.RDB$FIELD_SUB_TYPE,
  c.RDB$FIELD_LENGTH, c.RDB$FIELD_SCALE, b.RDB$FIELD_ID
  FROM RDB$RELATIONS a
  INNER JOIN RDB$RELATION_FIELDS b
@@ -190,7 +190,10 @@
                        elif ftype == "timestamp":
                                ft = "T"
                        elif ftype == "blob":
-                               ft = "L"
+                               if r["rdb$field_sub_type"] == 1:
+                                       ft = "M"
+                               else:
+                                       ft = "L"
                        else:
                                ft = "?"
 



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to