Jiri Cincura | 2 Nov 2009 21:35
Gravatar

Support for c = <at> p or <at> p is null

Hi *,

I added %subj%, which is new in FB 2.5. Although the code fix is
pretty easy, there may be couple of code flows I didn't think of.
Hence it would be helpful if you grab sources, do build and test it
with different scenarios. Also I'll later this week (in a day or two)
put new build into weekly builds.

--

-- 
Jiri {x2} Cincura (CTO x2develop.com)
http://blog.cincura.net/ | http://www.ID3renamer.com

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
Jorge Alvarez | 3 Nov 2009 22:58
Picon

BLOB SUB_TYPE 0 field to readable string?

Hi there,


I need to read from a table with a field defined as:

BLOB SUB_TYPE 0 SEGMENT SIZE 80

When I load a DataTable with a FbDataReader, on this column I get what it looks like gibberish to me. FWIW, inspecting the same result set with IBExpert gives me a readable text on that column. So I guess some kind of conversion is in order. I don't know if that conversion should be done on the server itself  (some kind of casting on the SELECT query) or with the help of the provider on the client side.

I'm using the latest release of the Firebird.NET provider. Server version is 1.5.6 and it's a dialect 1 database.

Can someone please shed some light on the subject?

Best Regards,

-Jorge








2009/11/2 Jiri Cincura <diskuze <at> cincura.net>
Hi *,

I added %subj%, which is new in FB 2.5. Although the code fix is
pretty easy, there may be couple of code flows I didn't think of.
Hence it would be helpful if you grab sources, do build and test it
with different scenarios. Also I'll later this week (in a day or two)
put new build into weekly builds.

--
Jiri {x2} Cincura (CTO x2develop.com)
http://blog.cincura.net/ | http://www.ID3renamer.com

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@...
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Jiri Cincura | 3 Nov 2009 23:12
Gravatar

Re: BLOB SUB_TYPE 0 field to readable string?

On Tue, Nov 3, 2009 at 22:58, Jorge Alvarez <conversar@...> wrote:
> on the client side

The sub type 0 is binary. If you stored there some text, you have to
do the interpretation of it in application.

PS: Don't steal threads!

--

-- 
Jiri {x2} Cincura (CTO x2develop.com)
http://blog.cincura.net/ | http://www.ID3renamer.com

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
Jorge Alvarez | 3 Nov 2009 23:46
Picon

Re: BLOB SUB_TYPE 0 field to readable string?


2009/11/3 Jiri Cincura <diskuze-i04QUkT9ABbR7s880joybQ@public.gmane.org>
On Tue, Nov 3, 2009 at 22:58, Jorge Alvarez <conversar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> on the client side

The sub type 0 is binary. If you stored there some text, you have to
do the interpretation of it in application.

PS: Don't steal threads!

Sorry about that. :(  Promise not do it again. 

Back on topic, database/table is not mine, I wouldn't be doing such a strange thing as saving text on a binary field.

Do you have a hint on what should I look for to accomplish the "translation"?

Regards,

-Jorge
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@...
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Jiri Cincura | 4 Nov 2009 09:37
Gravatar

Re: BLOB SUB_TYPE 0 field to readable string?

On Tue, Nov 3, 2009 at 23:46, Jorge Alvarez <conversar@...> wrote:
> Do you have a hint on what should I look for to accomplish the
> "translation"?

http://msdn.microsoft.com/en-us/library/system.text.encoding.getstring.aspx

--

-- 
Jiri {x2} Cincura (CTO x2develop.com)
http://blog.cincura.net/ | http://www.ID3renamer.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Jorge Alvarez | 4 Nov 2009 16:17
Picon

Re: BLOB SUB_TYPE 0 field to readable string?

Thanks Jiri, I really appreciate your generous help. Upon further investigation I found out this is easier to solve on the server side. Below is the answer, I had to use a cached Google page as the original website was dead. Hope this helps someone in my particular situation.


Regards,

-Jorge

How to convert BLOB to string?
Direct conversion is not possible without using some UDF, but you can extract text using SUBSTRING function:

DECLARE VARIABLE c1 VARCHAR(32000);
SELECT SUBSTRING(blob1 FROM 1 FOR 32000) FROM t1 INTO c1;

Please note that maximum length for VARCHAR is 32767 bytes (which might be less characters in multi-byte character sets like UTF8).
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@...
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Vasily Kabanov (JIRA | 4 Nov 2009 10:34
Favicon

[FB-Tracker] Created: (DNET-281) FbConnectionStringBuilder default values behavior

FbConnectionStringBuilder default values behavior
-------------------------------------------------

                 Key: DNET-281
                 URL: http://tracker.firebirdsql.org/browse/DNET-281
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 2.5.1
         Environment: Windows
            Reporter: Vasily Kabanov
            Assignee: Jiri Cincura
            Priority: Minor

1) None of the properties in the connection string builder appears to have default values: if you create new
instance with parameterless constructor and try to get any property value you get an ArgumentException
because all the properties directly query the base class for hard-coded key value. This is very different
from other builders (such as SqlConnectionStringBuilder) and causes problems such as when you try to
create database connection dialog for the user. All these defaults need to be implemented manually
anyway in a wrapper.

fb.FbConnectionStringBuilder fbld = new fb.FbConnectionStringBuilder();
string userID = fbld.UserID; // throws exception

System.Data.SqlClient.SqlConnectionStringBuilder bld = new System.Data.SqlClient.SqlConnectionStringBuilder();
userID = bld.UserID; // returns empty string

2) If you set a property and then want to revert to default (delete key-value pair) there's no graceful way
(for example, for integer properties) as key names are hard-coded as literals and not exposed (as public
constants, for example). Also, after creating empty conn.string builder its Keys collection is empty
which is again different from other implementations.

--

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Julio Saucedo | 8 Nov 2009 06:13

Firebird and datasets

Hi,

Hope that someone can help me, I am a newbie on .NET, and I'm involved 
now developing an asp.net application with firebird. So, after reading 
some tutorials, I started with the Dataset approach, so basically I 
added a DataTable and a DataAdapter for a table to begin testings.
So, using some code that found in the ms documentation, i tried 
something like this in a Page event:

      DatasetTableAdapters.TableAdapterTest TableAdapterTest;  /* 
TableAdapter instance */
      Dataset.TestDataTable TestDataTable;   /* DataTable instance*/
      Dataset.TableRow Row;  /* Row instance */

      TableAdapterTest = new DatasetTableAdapters.TableAdapterTest();
      TestDataTable = new Dataset.TestDataTable();
      TestDataTable = TableAdapterTest.GetDataById(5);   /* A custom 
query to filter by Id */
      Row = (Dataset.TableRow)TestDataTable.Rows[0];
      Row.FIELD = Row.FIELD + " _Testing";  /* Use of typed dataset */

      Row.AcceptChanges();
      TableAdapterTest.Update(TestDataTable);

So, basically I wanted to test if this code make changes in the 
database, but it doesn't. I don't know what is missing, is necessary to 
explicitly commit the transaction? if the answer is yes, how can i do that?
I don't have problems to read data (the GetData() and GetDataById() 
works as expected).

Thanks in advance

Julio.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Jiri Cincura | 8 Nov 2009 09:25
Gravatar

Re: Firebird and datasets

On Sun, Nov 8, 2009 at 06:13, Julio Saucedo <julio@...> wrote:
> I don't know what is missing, is necessary to
> explicitly commit the transaction?

If you didn't started it explicitly, then no. Did you provided update
command for the table adapter with proper parameters?

--

-- 
Jiri {x2} Cincura (CTO x2develop.com)
http://blog.cincura.net/ | http://www.ID3renamer.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
mike grace | 9 Nov 2009 10:09
Picon

Re: Firebird and datasets

Hello Julio,

Don't do AcceptChanges(). Just update the row and then do the .Update().

HTH

Mike

> Hi,
> 
> Hope that someone can help me, I am a newbie on .NET, and I'm involved
> now developing an asp.net application with firebird. So, after reading
> some tutorials, I started with the Dataset approach, so basically I
> added a DataTable and a DataAdapter for a table to begin testings.
> So, using some code that found in the ms documentation, i tried
> something like this in a Page event:
> DatasetTableAdapters.TableAdapterTest TableAdapterTest;  /*
> TableAdapter instance */
> Dataset.TestDataTable TestDataTable;   /* DataTable instance*/
> Dataset.TableRow Row;  /* Row instance */
> TableAdapterTest = new DatasetTableAdapters.TableAdapterTest();
> TestDataTable = new Dataset.TestDataTable();
> TestDataTable = TableAdapterTest.GetDataById(5);   /* A custom
> query to filter by Id */
> Row = (Dataset.TableRow)TestDataTable.Rows[0];
> Row.FIELD = Row.FIELD + " _Testing";  /* Use of typed dataset */
> Row.AcceptChanges();
> TableAdapterTest.Update(TestDataTable);
> So, basically I wanted to test if this code make changes in the
> database, but it doesn't. I don't know what is missing, is necessary
> to
> explicitly commit the transaction? if the answer is yes, how can i do
> that?
> I don't have problems to read data (the GetData() and GetDataById()
> works as expected).
> Thanks in advance
> 
> Julio.
> 
> ----------------------------------------------------------------------
> --------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Firebird-net-provider mailing list
> Firebird-net-provider@...
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

Gmane