Discussion:
[Firebird-odbc-devel] Firebird 2.1 ODBC Numeric and Date fields.
Steve Cookson
15 years ago
Permalink
Hi People,

I am using Perl on Linux (Kubuntu 9.10) with Firebird 2.1. I wanted to use
ODBC, but in the end I gave up using it because I couldn't get the DATE or
number formats to work. Instead I used the DBI::Interbase driver, while it
works, it is subject to occasional crashes, so I'd like to go back to trying
ODBC.

My current problem is that if I use isql on employee.fbd, (eg select first 1
change_date from salary_history), I get:

1992-12-15 00:00:00. (Data type timestamp)

if I use it on my own database, (eg select first 1
att_patient_examination_ddt from tbl_patient_exam), I get:

22256-10-18. (Data type date)

Any ideas what I could do?

Well, actually, writing that last bit has helped. If I change from a DATE
data type to a TIMESTAMP, it seems to work, but now I need to check time
fields and number fields. Surely the DATE format should work? What do I
need to do to fix this (NB Flamerobin has no such problems on the same
field)? I am also encoutering other sporadic problems such as a read being
successful one moment and unsuccessful the next? Is this a known problem?

Regards

Steve

The odbcinst.ini file entry is:

[Firebird]
Description = Firebird/InterBase(r) driver
Driver = /usr/lib/libOdbcFb.so
Setup = /usr/lib/libOdbcFb.so
UsageCount = 2

The odbc.ini file entries are:

[END_DB]
Description = Firebird
Driver = Firebird
Dbname = localhost:/home/steve/Documents/Endoscopia/DB/ENDOSCOPIA.FDB
Client =
User = SYSDBA
Password = masterkey
Role =
CharacterSet = NONE
ReadOnly = No
NoWait = No
Dialect = 3
QuotedIdentifier = Yes
SensitiveIdentifier = No
AutoQuotedIdentifier = No

[Employee]
Description = Firebird
Driver = Firebird
Dbname = localhost:/home/steve/Documents/employee.fdb
Client =
User = SYSDBA
Password = masterkey
Role =
CharacterSet = NONE
ReadOnly = No
NoWait = No
Dialect = 3
QuotedIdentifier = Yes
SensitiveIdentifier = No
AutoQuotedIdentifier = No
André Knappstein, Controlling
15 years ago
Permalink
This might be a stupid question, but did you make sure that your
version of employee.fdb is indeed also dialect 3?




~~~Ihre Nachricht~~~

SC> Hi People,

SC> I am using Perl on Linux (Kubuntu 9.10) with Firebird 2.1. I wanted to use
SC> ODBC, but in the end I gave up using it because I couldn't get the DATE or
SC> number formats to work. Instead I used the DBI::Interbase driver, while it
SC> works, it is subject to occasional crashes, so I'd like to go back to trying
SC> ODBC.

SC> My current problem is that if I use isql on employee.fbd, (eg select first 1
SC> change_date from salary_history), I get:

SC> 1992-12-15 00:00:00. (Data type timestamp)

SC> if I use it on my own database, (eg select first 1
SC> att_patient_examination_ddt from tbl_patient_exam), I get:

SC> 22256-10-18. (Data type date)

SC> Any ideas what I could do?

SC> Well, actually, writing that last bit has helped. If I change from a DATE
SC> data type to a TIMESTAMP, it seems to work, but now I need to check time
SC> fields and number fields. Surely the DATE format should work? What do I
SC> need to do to fix this (NB Flamerobin has no such problems on the same
SC> field)? I am also encoutering other sporadic problems such as a read being
SC> successful one moment and unsuccessful the next? Is this a known problem?

SC> Regards

SC> Steve

SC> The odbcinst.ini file entry is:

SC> [Firebird]
SC> Description = Firebird/InterBase(r) driver
SC> Driver = /usr/lib/libOdbcFb.so
SC> Setup = /usr/lib/libOdbcFb.so
SC> UsageCount = 2

SC> The odbc.ini file entries are:

SC> [END_DB]
SC> Description = Firebird
SC> Driver = Firebird
SC> Dbname = localhost:/home/steve/Documents/Endoscopia/DB/ENDOSCOPIA.FDB
SC> Client =
SC> User = SYSDBA
SC> Password = masterkey
SC> Role =
SC> CharacterSet = NONE
SC> ReadOnly = No
SC> NoWait = No
SC> Dialect = 3
SC> QuotedIdentifier = Yes
SC> SensitiveIdentifier = No
SC> AutoQuotedIdentifier = No

SC> [Employee]
SC> Description = Firebird
SC> Driver = Firebird
SC> Dbname = localhost:/home/steve/Documents/employee.fdb
SC> Client =
SC> User = SYSDBA
SC> Password = masterkey
SC> Role =
SC> CharacterSet = NONE
SC> ReadOnly = No
SC> NoWait = No
SC> Dialect = 3
SC> QuotedIdentifier = Yes
SC> SensitiveIdentifier = No
SC> AutoQuotedIdentifier = No





SC> ------------------------------------------------------------------------------
SC> Download Intel® Parallel Studio Eval
SC> Try the new software tools for yourself. Speed compiling, find bugs
SC> proactively, and fine-tune applications for parallel performance.
SC> See why Intel Parallel Studio got high marks during beta.
SC> http://p.sf.net/sfu/intel-sw-dev
SC> _______________________________________________
SC> Firebird-odbc-devel mailing list
SC> Firebird-odbc-***@lists.sourceforge.net
SC> https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel

---

Loading...