From: Bob C. <Ad...@na...> - 2003-06-12 13:19:31
|
From: Navneet B. <nbh...@he...> - 2003-10-04 01:39:52
|
Hi, I have a field where I want to store Image. This image can be of any size between 4KB to 100 KB. I want to store this image into the firebird database, I read through the documentation and was very confused regarding the segment and reading and writing one segment at a time. I have a stream in .NET which has the image. I am confused about the following things. 1. What segment size should i define. 2. How do i read the data using .NET provider (with supose I define the segment size to 10KB) 3. How do I write the data to the database with .NET provider with insert command. 4. How do I write a procedure to insert the image to the database. 5. How do I write the data to the database with .NET provider with procedure. Can anyone please help me with this. It would be really great if you can provide example code. Thanks and Regards Navneet Bhartia |
From: Carlos G. A. <car...@te...> - 2003-10-04 10:08:45
|
Hello: > can provide example code. A sample from the NUnit test suite for binary blob write & read: public void BinaryBlobTest() { int id_value = System.DateTime.Now.Millisecond; string selectText = "SELECT blob_field FROM test_table_01 WHERE int_field = " + id_value.ToString(); string insertText = "INSERT INTO test_table_01 (int_field, blob_field) values(@int_field, @blob_field)"; Console.WriteLine("\r\n\r\nBinary Blob Test"); Console.WriteLine("Generating an array of temp data"); // Generate an array of temp data byte[] insert_values = new byte[100000*4]; RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); rng.GetBytes(insert_values); Console.WriteLine("Executing insert command"); // Execute insert command FbCommand insert = new FbCommand(insertText, connection, transaction); insert.Parameters.Add("@int_field", FbDbType.Integer).Value = id_value; insert.Parameters.Add("@blob_field", FbDbType.Binary).Value = insert_values; insert.ExecuteNonQuery(); transaction.Commit(); Console.WriteLine("Checking inserted values"); // Check that inserted values are correct FbCommand select = new FbCommand(selectText, connection); FbDataReader reader = select.ExecuteReader(); if (reader.Read()) { if (!reader.IsDBNull(0)) { byte[] select_values = (byte[])reader[0]; for (int i = 0; i < insert_values.Length; i++) { if (insert_values[i] != select_values[i]) { throw new Exception("differences at index " + i.ToString()); } } } } Console.WriteLine("Finishing test"); reader.Close(); // Start a new Transaction transaction = connection.BeginTransaction(); } -- Best regards Carlos Guzmán Álvarez Vigo-Spain "Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las mismas cosas." Albert Einstein. |
From: <fir...@th...> - 2003-12-16 03:39:03
|
Hi, I'm using the Firebird .NET provider components in the Visual Studio .NET 2003 IDE. I was wondering whether it is possible to set any of the attributes that need to parse SQL. For example, when I click on the '...' button next to the CommandText attribute of an FbCommand component, I receive a 'Specified cast is not valid.' error. This also happens with the Parameters attribute and in other components (e.g. Mappings attribute in FbDataAdapter) Is there some way to enable this? Thanks. Ben. Using FirebirdSql.Data.Firebird version 1.5.1437.22333 |
From:
<car...@te...> - 2003-12-16 14:11:14
|
Hello: > I'm using the Firebird .NET provider components in the Visual Studio .NET > 2003 IDE. > > I was wondering whether it is possible to set any of the attributes that > need to parse SQL. For example, when I click on the '...' button next to the > CommandText attribute of an FbCommand component, I receive a 'Specified cast > is not valid.' error. This also happens with the Parameters attribute and in > other components (e.g. Mappings attribute in FbDataAdapter) > > Is there some way to enable this? The only one that isn't working for me is the Connection String editor, it's fixed yet in CVS. -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Phillip C. <phi...@ba...> - 2004-03-23 17:10:22
|
Hi > The connection is being done always against the same server?? The user > and password is configured in the target server?? The program and database are=A0always on the local computer. So when i = say i have tried it on the same database but on multiple computers I mean I have transported the database to a different computer and run the program on it from there. The program does not have the option to backup from a computer over the network as it performs the backup from the file directly. Hope this makes sense. =A0 Cheers Phil |
From:
<car...@te...> - 2004-03-23 18:05:57
|
Hello: > The program and database are always on the local computer. So when i say > i have tried it on the same database but on multiple computers I mean I > have transported the database to a different computer and run the > program on it from there. The program does not have the option to backup > from a computer over the network as it performs the backup from the file > directly. Hope this makes sense. And the user you are using for login exists in all computers ?? Can you try using always SYSDBA ( if you are not doing it yet :) ) with the correct password in each computer ?? -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Javier P. <hig...@so...> - 2004-06-09 19:21:51
|
From: <nic...@pa...> - 2004-07-15 13:47:40
|
Hi, Could somebody tell me how to unsubscribe ? Thx, Nico |
From:
<car...@te...> - 2004-07-15 14:45:20
|
Hello: >Could somebody tell me how to unsubscribe ? > http://lists.sourceforge.net/lists/listinfo/firebird-net-provider -- Best regards Carlos Guzmán álvarez Vigo-Spain |
From: <HAl...@ab...> - 2004-07-28 14:59:45
|
Hi Carlos, Thank you for ur prompt reply. I modified my code as you had suggested and then tried again. The code reads as below now. float[] myArray = null; if( reader.Read() ) { System.Array tmp = (System.Array)reader.GetValue(1); myArray = new float[tmp.Length]; System.Array.Copy(tmp, myArray, myArray.Length); } an exception is thrown by the System.Array tmp = (System.Array)reader.GetValue(1); in the above code. the exception message reads thus. {"Exception of type FirebirdSql.Data.Firebird.Gds.GdsException was thrown." } the error code shown is ErrorCode: 335544457 which i gather represents an gds_open_trans option. i have not used transaction when trying to retrieve data. Regards Harsha |
From:
<car...@te...> - 2004-07-28 15:08:03
|
Hello: >the error code shown is ErrorCode: 335544457 >which i gather represents an gds_open_trans option. >i have not used transaction when trying to retrieve data. > It's: 335544457=subscript out of bounds Can you send the description of field in the table ?? Can you can test it with 1.6.0 that has improvements in the array data type support ;) ?? And you should add a check for null before read the value. -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: <de...@se...> - 2004-08-10 13:33:01
|
Hi I have problem with stable relase 1.6 Firebird .NET provider (sorry for very bad english) I have .NET 1.1 and Firebird 1.5 Connection string is User=3D{0};Password=3D{1};Database=3Dc:\\something\\data.fdb;DataSource= =3Dlocalhost;Port=3D3050;Dialect=3D3;Charset=3DWIN1250;Role=3D;Connecti= on Lifetime=3D15;Pooling=3Dtrue;Packet Size=3D8192" my code =09=09=09try =09=09=09{ =09=09=09=09FbConnection=09myConnection =3D new FbConnection(Connection= String); =09=09=09=09myConnection.Open(); =09=09=09=09TestString=3DExecQuery; =09=09=09=09FbTransaction=09myTransaction=09 =3D myConnection.BeginTra= nsaction(); =09=09=09=09FbCommand=09=09myCommand =3D new FbCommand(ExecQuery, myCon= nection, myTransaction); =09=09=09=09try =09=09=09=09{ =09=09=09=09=09myCommand.ExecuteNonQuery(); =09=09=09=09=09myCommand.Transaction.Commit(); =09=09=09=09=09myCommand.Dispose(); =09=09=09=09=09return true; =09=09=09=09} =09=09=09=09finally =09=09=09=09{ =09=09=09=09=09myConnection.Close(); =09=09=09=09} =09=09=09} =09=09=09catch (Exception myException) =09=09=09{ =09=09=09=09throw myException; =09=09=09} randomly myConnection.Close except this message Object reference not set to an instance of an object. This code is part of big ASP.NET application and here is many query exe= cutions in time. This exception thrown randomly. I use 1.5 version of .NET provider and with this version is all OK. It is my bug or it is bug of provider or it is bug of Firebird server? ____________________________________________________________ Obchodn=ED d=F9m.cz - =B9irok=FD sortiment dom=E1c=EDch spot=F8ebi=E8=F9= a elektroniky, v=FDrazn=E9 slevy. Nav=B9tivte http://ad.seznam.cz/clickthru?spotId=3D73742 |
From:
<car...@te...> - 2004-08-10 14:33:28
|
Hello: Please try to send the emails with a Subject :) >Hi I have problem with stable relase 1.6 Firebird .NET provider >(sorry for very bad english) > > With the final version ?? (that was a problem in the RC but should be fixed in the final version) -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: luciane <lu...@te...> - 2004-08-10 20:00:40
|
confirm 198568 |
From: Henning S. <hsw...@ms...> - 2004-10-08 23:49:09
|
<html><div style='background-color:'><DIV class=RTE> <P>Hello,</P> <P>I'm getting an error when I try to update an record with firebird.net driver.</P> <P>the following procedure ends in an error:</P> <P><BR>procedure TADBildePrisMatrise.Dg1_UpdateCommand(source: System.Object; e: System.Web.UI.WebControls.DataGridCommandEventArgs);<BR>var<BR> id: string;<BR> fbcon:fbconnection;<BR> fbcom:fbcommand;<BR>begin<BR> id := dg1.DataKeys[e.Item.ItemIndex].ToString;<BR> fbcon := fbconnection.create(getconnectionstring);</P> <P> fbcom := fbcommand.Create;<BR> fbcom.Connection := fbcon;<BR> fbcom.CommandText := ('UPDATE BILDEPRISMATRISE SET FELTNAVN = @SFELTNAVN, VERDI = @SVERDI, REFID1 = @SREFID1, REFID2 = @SREFID2 WHERE IDPRISMATRISE = @SIDL');<BR> fbcom.Parameters.Add('SFELTNAVN',(e.Item.Cells[2].Controls[0] as TextBox).Text);<BR> fbcom.Parameters.Add('SVERDI',(e.Item.Cells[3].Controls[0] as TextBox).Text);<BR> fbcom.Parameters.Add('SREFID1',(e.Item.Cells[4].Controls[0] as TextBox).Text);<BR> fbcom.Parameters.Add('SREFID2',(e.Item.Cells[5].Controls[0] as TextBox).Text);<BR> fbcom.Parameters.Add('SID',id);</P> <P> fbcon.Open;<BR> try<BR> fbcom.ExecuteNonQuery;<BR> finally<BR> fbcon.Close;<BR> end;<BR>end;<BR><BR>If I change the sql command to this: </P> <P> (*<BR> fbcom := fbcommand.Create(swSqlFB(format('UPDATE BILDEPRISMATRISE SET FELTNAVN = %s, VERDI = %s, REFID1 = %s, REFID2 = %s WHERE IDPRISMATRISE = %s',<BR> [QuotedStr((e.Item.Cells[2].Controls[0] as TextBox).Text),<BR> QuotedStr((e.Item.Cells[3].Controls[0] as TextBox).Text),<BR> QuotedStr((e.Item.Cells[4].Controls[0] as TextBox).Text),<BR> QuotedStr((e.Item.Cells[5].Controls[0] as TextBox).Text),<BR> QuotedStr(id)])),fbcon);<BR> *)<BR> all works fine.</P> <P>This is the error message I'm getting:</P><FONT size=2> <P>---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index</P> <P>at System.Collections.ArrayList.get_Item(Int32 index)<BR>at System.Collections.SyncArrayList.get_Item(Int32 index)<BR>at FirebirdSql.Data.Firebird.FbParameterCollection.get_Item(Int32 parameterIndex)<BR>at FirebirdSql.Data.Firebird.FbParameterCollection.get_Item(String parameterName)<BR>at FirebirdSql.Data.Firebird.FbCommand.buildNamedParametersDescriptor(Int16 count)<BR>at FirebirdSql.Data.Firebird.FbCommand.buildParametersDescriptor()<BR>at FirebirdSql.Data.Firebird.FbCommand.InternalPrepare()<BR>at FirebirdSql.Data.Firebird.FbCommand.executeCommand(CommandBehavior behavior, Boolean split)<BR>at FirebirdSql.Data.Firebird.FbCommand.ExecuteNonQuery()<BR>at ADBildePrisMatrise.TADBildePrisMatrise.Dg1_UpdateCommand(Object source, DataGridCommandEventArgs e) in Admin\Bildebase\ADBildePrisMatrise.pas:line 111<BR>at System.Web.UI.WebControls.DataGrid.OnUpdateCommand(DataGridCommandEventArgs e)</P> <P>line 111 is: fbcom.ExecuteNonQuery;</P> <P>Software</P> <P>Firebird.net v.1.6.2<BR>Firebird server 1.5.0<BR>.Net Framework 1.1, no sp.<BR>Delphi 8 sp2</P> <P> </P></FONT></DIV></div></html> |
From: Andrzej K. <aka...@sp...> - 2004-10-09 07:46:51
|
this is just a wild guess but try: fbcom.CommandText :=3D ('UPDATE BILDEPRISMATRISE SET FELTNAVN =3D = @SFELTNAVN, VERDI =3D @SVERDI, REFID1 =3D @SREFID1, REFID2 =3D @SREFID2 = WHERE IDPRISMATRISE =3D @SIDL'); fbcom.Parameters.Add('@SFELTNAVN',(e.Item.Cells[2].Controls[0] as = TextBox).Text); fbcom.Parameters.Add('@SVERDI',(e.Item.Cells[3].Controls[0] as = TextBox).Text); fbcom.Parameters.Add('@SREFID1',(e.Item.Cells[4].Controls[0] as = TextBox).Text); fbcom.Parameters.Add('@SREFID2',(e.Item.Cells[5].Controls[0] as = TextBox).Text); fbcom.Parameters.Add('@SID',id); CUIN Kaczy |
From: Peter C. <Pet...@sa...> - 2004-11-22 13:51:29
|
From: <ma...@ga...> - 2004-12-28 13:05:43
|
Hi I tried to use fbembed.dll (copied it to the bin directory of my ASP.NET Project) with Gentle.NET (Ver. 1.1.3, from SVN ) I am using the included Firebird Provider (1.6.3) The connection string (in gentle.config) is: <DefaultProvider name="Firebird" connectionString="User=SYSDBA;Password=masterkey;Database=C:\DB_TESTS\SYNCHROVET_2.FDB;ServerType=1" /> Everything worked fine before using the SuperServer, now I get the exception: Error: DatabaseUnavailable The database backend could not be reached (check the connection string). But I don't know what should be wrong with the conn'string. Any suggestions? |
From: <jc...@gm...> - 2004-12-28 13:16:27
|
Where is the server location at connection string??? On Tue, 28 Dec 2004 14:10:43 +0100 (CET), ma...@ga... <ma...@ga...> w= rote: >=20 > Hi I tried to use fbembed.dll (copied it to the bin directory of my > ASP.NET Project) with Gentle.NET (Ver. 1.1.3, from SVN ) > I am using the included Firebird Provider (1.6.3) >=20 > The connection string (in gentle.config) is: >=20 > <DefaultProvider name=3D"Firebird" > connectionString=3D"User=3DSYSDBA;Password=3Dmasterkey;Database=3DC:\DB_T= ESTS\SYNCHROVET_2.FDB;ServerType=3D1" > /> >=20 > Everything worked fine before using the SuperServer, now I get the except= ion: >=20 > Error: DatabaseUnavailable The database backend could not be reached > (check the connection string). >=20 > But I don't know what should be wrong with the conn'string. >=20 > Any suggestions? >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider >=20 --=20 [] J=FAlio C=E9sar K=F6del http://www.tenebree.com |
From:
<car...@te...> - 2004-12-28 14:45:13
|
Hello: >Hi I tried to use fbembed.dll (copied it to the bin directory of my >ASP.NET Project) with Gentle.NET (Ver. 1.1.3, from SVN ) >I am using the included Firebird Provider (1.6.3) > >The connection string (in gentle.config) is: > ><DefaultProvider name="Firebird" >connectionString="User=SYSDBA;Password=masterkey;Database=C:\DB_TESTS\SYNCHROVET_2.FDB;ServerType=1" >/> > What happens ig you try this: <DefaultProvider name="Firebird" connectionString="User=SYSDBA;Password=masterkey;DataSource=localhost;Database=C:\DB_TESTS\SYNCHROVET_2.FDB;ServerType=1" /> -- Best regards Carlos Guzmán Álvarez Vigo-Spain "In the end there can be only one" (Highlander) |
From: <ma...@ga...> - 2004-12-28 18:25:12
|
Still doesn't work, also tried: Database=localhost/3050:C: .... and some other variations for the conn'string. Could this be heppen because there is a SuperServer (deactivated in Guardian) present on my machine? > Hello: > >>Hi I tried to use fbembed.dll (copied it to the bin directory of my >>ASP.NET Project) with Gentle.NET (Ver. 1.1.3, from SVN ) >>I am using the included Firebird Provider (1.6.3) >> >>The connection string (in gentle.config) is: >> >><DefaultProvider name="Firebird" >>connectionString="User=SYSDBA;Password=masterkey;Database=C:\DB_TESTS\SYNCHROVET_2.FDB;ServerType=1" >>/> >> > What happens ig you try this: > > <DefaultProvider name="Firebird" > connectionString="User=SYSDBA;Password=masterkey;DataSource=localhost;Database=C:\DB_TESTS\SYNCHROVET_2.FDB;ServerType=1" > /> > > > > -- > Best regards > > Carlos Guzmán Álvarez > Vigo-Spain > > "In the end there can be only one" (Highlander) > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > gopf-users mailing list > gop...@li... > https://lists.sourceforge.net/lists/listinfo/gopf-users > |
From:
<car...@te...> - 2004-12-28 19:11:12
|
Hello: >Still doesn't work, > >also tried: Database=localhost/3050:C: .... > >and some other variations for the conn'string. > >Could this be heppen because there is a SuperServer (deactivated in >Guardian) present on my machine? > Is the fbembed.dll being correctly loaded by the provider ?? > (copied it to the bin directory of my ASP.NET Project) The provider assembly is in that directory too ?? -- Best regards Carlos Guzmán Álvarez Vigo-Spain "In the end there can be only one" (Highlander) |
From: <jc...@gm...> - 2004-12-28 19:40:32
|
Consider this: All file system access made by an ASP.Net application is done via the localmachine\ASP.Net user. Maybe this's nothing, but, there's no cost in checking ;-) On Tue, 28 Dec 2004 20:11:04 +0100, Carlos Guzm=E1n =C1lvarez <car...@te...> wrote: > Hello: >=20 > >Still doesn't work, > > > >also tried: Database=3Dlocalhost/3050:C: .... > > > >and some other variations for the conn'string. > > > >Could this be heppen because there is a SuperServer (deactivated in > >Guardian) present on my machine? > > > Is the fbembed.dll being correctly loaded by the provider ?? >=20 > > (copied it to the bin directory of my ASP.NET Project) >=20 > The provider assembly is in that directory too ?? >=20 > -- > Best regards >=20 > Carlos Guzm=E1n =C1lvarez > Vigo-Spain >=20 > "In the end there can be only one" (Highlander) >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider >=20 --=20 [] J=FAlio C=E9sar K=F6del http://www.tenebree.com |
From: <ma...@ga...> - 2004-12-29 12:50:59
|
Thanks for the hint but the folder where the .fdb file lies in is configured for full access by the ASP.NET Account and the "bin" folder of a web application (where fbembed.dll lies in) has full access by default. I'll keep on trying, I am sure it's just one of those silly errors that you never thought to make... As I could see from the debug output, the exception is not caused by the gentle framework itself, it originates in .Net Provider > Consider this: > All file system access made by an ASP.Net application is done via the > localmachine\ASP.Net user. > Maybe this's nothing, but, there's no cost in checking ;-) > > > On Tue, 28 Dec 2004 20:11:04 +0100, Carlos Guzmán Álvarez > <car...@te...> wrote: >> Hello: >> >> >Still doesn't work, >> > >> >also tried: Database=localhost/3050:C: .... >> > >> >and some other variations for the conn'string. >> > >> >Could this be heppen because there is a SuperServer (deactivated in >> >Guardian) present on my machine? >> > >> Is the fbembed.dll being correctly loaded by the provider ?? >> >> > (copied it to the bin directory of my ASP.NET Project) >> >> The provider assembly is in that directory too ?? >> >> -- >> Best regards >> >> Carlos Guzmán Álvarez >> Vigo-Spain >> >> "In the end there can be only one" (Highlander) >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://productguide.itmanagersjournal.com/ >> _______________________________________________ >> Firebird-net-provider mailing list >> Fir...@li... >> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider >> > > > -- > [] > Júlio César Ködel > http://www.tenebree.com > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |