Discussion:
[Firebird-odbc-devel] FW: Firebird 2.1 ODBC Numeric and Date fields.
bill lam
2010-10-05 15:03:46 UTC
Permalink
Steve,
You did not show how you call sqlbindcol, without detail it is hard to
guess what was wrong.
Here is a resend of the original message (including .ini files) from March
this year.
Is that what you meant? I can send you the Perl code snippet if you like,
but maybe that's too much detail.
Regards
Steve
Sent: 24 March 2010 21:50
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
1992-12-15 00:00:00. (Data type timestamp)
if I use it on my own database, (eg select first 1
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
[Firebird]
Description = Firebird/InterBase(r) driver
Driver = /usr/lib/libOdbcFb.so
Setup = /usr/lib/libOdbcFb.so
UsageCount = 2
[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
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
Steve
2010-10-05 14:47:28 UTC
Permalink
Here is a resend of the original message (including .ini files) from March
this year.

Is that what you meant? I can send you the Perl code snippet if you like,
but maybe that's too much detail.

Regards

Steve
Sent: 24 March 2010 21:50
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
1992-12-15 00:00:00. (Data type timestamp)
if I use it on my own database, (eg select first 1
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
[Firebird]
Description = Firebird/InterBase(r) driver
Driver = /usr/lib/libOdbcFb.so
Setup = /usr/lib/libOdbcFb.so
UsageCount = 2
[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
Steve
2010-10-05 21:44:07 UTC
Permalink
Hi Bill,
Post by bill lam
You did not show how you call sqlbindcol, without detail it is hard to
guess what was wrong.
I don't know what sqlbindcol is, all I do is:

my $dbh = DBI->connect("DBI:ODBC:END_DB");

Which calls the unixODBC driver manager.

Which is directed to the database and diver as follows:

odbcinst.ini>>

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

odbc.ini>>

[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

But I'm not sure this answers your question.

Regards

Steve
bill lam
2010-10-05 23:20:53 UTC
Permalink
Post by Steve
Hi Bill,
Post by bill lam
You did not show how you call sqlbindcol, without detail it is hard to
guess what was wrong.
my $dbh = DBI->connect("DBI:ODBC:END_DB");
Which calls the unixODBC driver manager.
Without knowing how DBI call sqlbindcol, and how it decodes the buffer
after fetching a row, or what is the output of sqldescribecol,
it will be also possible that the culprit being DBI itself. However my
knowledge of perl is very limited.
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
Loading...