From: Derek E. <de...@sp...> - 2003-10-27 23:20:56
|
After executing ExecuteReader on a command object I am trying to loop = over the results and write them to the Console. However when I execute reader.Read() the program gives no response and basically hangs. =20 Here is the code that I am using (the sproc is just a select statement returning two columns) =20 FbConnection conn =3D new FbConnection(connstring); FbCommand cmd =3D new FbCommand( "GetResults", conn ); cmd.CommandType =3D CommandType.StoredProcedure; conn.Open(); FbDataReader reader =3D cmd.ExecuteReader(); =20 while (reader.Read()) { Console.WriteLine("(0) {1}", reader.GetValue(0), = reader.GetValue(1)); } =20 Am I doing something wrong, or is this a bug?? I am using Firebird 1.5.0 (Win32) and Dot Net Provider Beta 3 =20 Thanks, Derek |
From:
<car...@te...> - 2003-10-28 08:34:36
|
Hello: > > Am I doing something wrong, or is this a bug?? > I am using Firebird 1.5.0 (Win32) and Dot Net Provider Beta 3 Seems to be correct, are you using .net 1.0 or 1.1 ?? can you send the sp code ?? -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Derek E. <de...@sp...> - 2003-10-28 09:36:24
|
1.1 Don't have the exact code handy at the moment (its at work). However here is what it does. Declared two output parameters (id - = integer and name - char(100)) and does the select id, name from test into :id, = :name I am not even sure if my proc is using the correct syntax as it seems a = very strange way of doing things. Thanks -----Original Message----- From: fir...@li... [mailto:fir...@li...] On Behalf Of Carlos Guzm=E1n =C1lvarez Sent: Tuesday, 28 October 2003 9:34 p.m. To: Derek Ekins Cc: fir...@li... Hello: > > Am I doing something wrong, or is this a bug?? > I am using Firebird 1.5.0 (Win32) and Dot Net Provider Beta 3 Seems to be correct, are you using .net 1.0 or 1.1 ?? can you send the sp code ?? -- Best regards Carlos Guzm=E1n =C1lvarez Vigo-Spain ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ Firebird-net-provider mailing list Fir...@li... https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |
From:
<car...@te...> - 2003-10-28 09:55:13
|
Hello: > 1.1 > Don't have the exact code handy at the moment (its at work). > However here is what it does. Declared two output parameters (id - integer > and name - char(100)) and does the select id, name from test into :id, > :name > I am not even sure if my proc is using the correct syntax as it seems > a very > strange way of doing things. Looks like this ?? CREATE PROCEDURE SELECT_DATA RETURNS ( INT_FIELD INTEGER, VARCHAR_FIELD VARCHAR(100), DECIMAL_FIELD DECIMAL(15,2)) AS begin SELECT INT_FIELD, VARCHAR_FIELD, DECIMAL_FIELD FROM TEST_TABLE_01 WHERE INT_FIELD = 2 INTO :INT_FIELD, :VARCHAR_FIELD, :DECIMAL_FIELD; suspend; end -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Derek E. <de...@sp...> - 2003-10-28 10:08:36
|
Yup that=92s it. -----Original Message----- From: Carlos Guzm=E1n =C1lvarez [mailto:car...@te...]=20 Sent: Tuesday, 28 October 2003 10:54 p.m. To: Derek Ekins Cc: fir...@li... Hello: > 1.1 > Don't have the exact code handy at the moment (its at work). > However here is what it does. Declared two output parameters (id - = integer > and name - char(100)) and does the select id, name from test into :id, = > :name > I am not even sure if my proc is using the correct syntax as it seems=20 > a very > strange way of doing things. Looks like this ?? CREATE PROCEDURE SELECT_DATA RETURNS ( INT_FIELD INTEGER, VARCHAR_FIELD VARCHAR(100), DECIMAL_FIELD DECIMAL(15,2)) AS begin SELECT INT_FIELD, VARCHAR_FIELD, DECIMAL_FIELD FROM TEST_TABLE_01 =20 WHERE INT_FIELD =3D 2 INTO :INT_FIELD, :VARCHAR_FIELD, :DECIMAL_FIELD; suspend; end -- Best regards Carlos Guzm=E1n =C1lvarez Vigo-Spain |