From: Peter W. <Pe...@af...> - 2003-04-30 08:56:21
|
Hi, All - I have a problem and a question I'd appreciate help with... Problem - I can successfully connect to my database but cannot retrieve data. Calls to IDataReader.Read() and DataAdapter.Fill(DataSet) never return in the IDE/hang a compiled application. Code snippets follow, so you can see how the objects are created. FbConnection conn = new FbConnection(); conn.ConnectionString = "Database=C:\\PROGRAM FILES\\FIREBIRD\\PETETEST.FDB;User=SYSDBA;Password=masterkey;Dialect=3;Serve r=localhost"; conn.Open(); // successful FbTransaction trans = conn.BeginTransaction(); _selectCommand = "select * from users"; // DataReader FbCommand comm = new FbCommand(_selectCommand,conn,trans); IDataReader reader = comm.ExecuteReader(); while(reader.Read()){ // never returns } // DataAdapter FbDataAdapter da = new FbDataAdapter(); DataSet dset = new DataSet("dset"); da.SelectCommand = new FbCommand(_selectCommand,conn,trans); da.Fill(dset); // never returns The problem is clearly so basic that I must be doing something wrong, but identical code works with other data providers. I have the same problem with RC1 and RC2. Question - It appears (from error messages if I don't) that a transaction must be started and commited even for a simple query like this - is this correct? It seems like a huge and unnecessary overhead. Thanks, Peter Wood ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** |