From: Wilhelmina M. <w.m...@ve...> - 2003-12-30 20:05:38
|
Hello, =20 I am trying to convert some C# code the uses MSDE database with Firebird database. When I execute the following code: =20 private DataSet m_patientListDS =3D new DataSet("PatientList"); private FbDataAdapter m_patientAdapter =3D new FbDataAdapter(); =20 m_patientAdapter.TableMappings.Add("Table", "RS_PatientLevel"); FbCommand patientCommand =3D new FbCommand(SELECT_FROM_PatientLevel(), OpenConnection()); patientCommand.CommandType =3D CommandType.Text; m_patientAdapter.SelectCommand =3D patientCommand; m_patientAdapter.Fill(m_patientListDS); =20 I catch the following exception when the fifth line is executed: =20 Message: "Command must have a valid Transaction." _COMPlusExceptionCode: -532459699 HResult: -2146233079 =20 Note that the FbComand parameters SELECT_FROM_PatientLevel() is simply a function that returns the string to select the rows of an entire table = and OpenConnection() returns an open FbConnection. =20 These lines of code fails at the initialization step when the table is = empty and no rows are returned. When I run the same code using MSDE under the same conditions, I get no error. =20 Does anyone have any idea what I am doing wrong? =20 Mimi Maloles=20 =20 |
From:
<car...@te...> - 2003-12-30 21:50:51
|
Hello: > Does anyone have any idea what I am doing wrong? I have tested it with this code: FbConnection connection = new FbConnection(connectionString); connection.Open(); string sql = "select * from divisacb"; DataSet m_patientListDS = new DataSet("PatientList"); FbDataAdapter m_patientAdapter = new FbDataAdapter(); m_patientAdapter.TableMappings.Add("Table", "RS_PatientLevel"); FbCommand patientCommand = new FbCommand(sql, connection); patientCommand.CommandType = CommandType.Text; m_patientAdapter.SelectCommand = patientCommand; m_patientAdapter.Fill(m_patientListDS); connection.Close(); having no problem, tell to me if it's no correct. Which version of the .NET Data Provider are you using ?? Can you send a test case ?? -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Thomas B. <bie...@gm...> - 2004-01-31 02:55:22
|
Hello everyone! I'm experiencing the same problem and tried to reproduce Carlos' working code (see below). It's not working for me (using Version 1.5RC3). Could this be related to "implicit transaction support"? (400...@te...) Best Regards, Thomas FbConnection connection = new FbConnection(...); connection.Open(); string sql = "select * from employee"; DataSet employeeDS = new DataSet("Employee"); FbDataAdapter adapter = new FbDataAdapter(); FbCommand selectCommand = new FbCommand(sql, connection); selectCommand.CommandType = CommandType.Text; adapter.SelectCommand = selectCommand; adapter.Fill(employeeDS, "employee"); "Command must have a valid Transaction." :-( |
From:
<car...@te...> - 2004-01-31 08:33:02
|
Hello: > I'm experiencing the same problem and tried to reproduce Carlos' working > code (see below). > > It's not working for me (using Version 1.5RC3). Could this be related to > "implicit transaction support"? (400...@te...) I'm going to recheck it ;) but inany case i'm going to release an RC4 in one or two days ( if don't make the release today ). -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From:
<car...@te...> - 2004-01-31 08:59:51
|
Hello: > It's not working for me (using Version 1.5RC3). Could this be related to > "implicit transaction support"? (400...@te...) It's working for me, i'm going to try to release the Rc 4 today. -- Best regards Carlos Guznmán Álvarez Vigo-Spain |
From: Thomas B. <bie...@gm...> - 2004-02-10 00:35:58
|
>> It's not working for me (using Version 1.5RC3). Could this be related >> to "implicit transaction support"? (400...@te...) > > It's working for me, i'm going to try to release the Rc 4 today. > Just wanted to confirm that it's also working here now (using RC4). Thomas |
From:
<car...@te...> - 2004-02-10 08:19:29
|
Hello: > Just wanted to confirm that it's also working here now (using RC4). Thanks :) -- Best regards Carlos Guzmán Álvarez Vigo-Spain |