From: Gianfranco G. <ggi...@se...> - 2004-03-30 01:20:31
|
Hi All When I attempt to FbDataAdapter1.InsertCommand = FbCommandBuilder1.GetInsertCommand(); I get this Exception An unhandled exception of type 'System.NullReferenceException' occurred in firebirdsql.data.firebird.dll Additional information: Object reference not set to an instance of an object. The same code works fine in the 1.5.2 version Thanks in advance for any help. Kind Regards Gianfranco Giannotti |
From:
<car...@te...> - 2004-03-30 09:15:18
|
Hello: > Additional information: Object reference not set to an instance of an > object. Can you send a complete test case, please ?? > The same code works fine in the 1.5.2 version Yes, but the FbCommandBuilder implementation of 1.6 is different than the 1.5.x one ;) -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Gianfranco G. <ggi...@se...> - 2004-03-30 14:03:34
|
Hi Carlos Here de complete implementation: string snx1 = "User=SYSDBA;" + "Password=masterkey;" + @"Database=d:\fb db\MyDB.fdb;" + "DataSource=WorkStation;" + "Port=3050;" + "Dialect=3;" + "Charset=WIN1252;" + "Role=;" + "Connection lifetime=15;" + "Pooling=true;" + "Server Type=0;" + "Packet Size=8192"; FbConnection cnx1; FbDataAdapter da1; FbCommandBuilder cb1; private void btnbutton1_Click(object sender, System.EventArgs e) { cnx1 = new FbConnection(snx1); da1 = new FbDataAdapter("select * from XXTABLE",cnx1); cb1 = new FbCommandBuilder(da1); da1.InsertCommand = cb1.GetInsertCommand(); da1.UpdateCommand = cb1.GetUpdateCommand(); da1.DeleteCommand = cb1.GetDeleteCommand(); } I hope this can help. Carlos, thanks in advance for your concerne. Best Regards Gianfranco "Carlos Guzmán Álvarez" <car...@te...> wrote in message news:406...@te...... > Hello: > > > Additional information: Object reference not set to an instance of an > > object. > > Can you send a complete test case, please ?? > > > The same code works fine in the 1.5.2 version > > Yes, but the FbCommandBuilder implementation of 1.6 is different than > the 1.5.x one ;) > > > > -- > Best regards > > Carlos Guzmán Álvarez > Vigo-Spain > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |
From:
<car...@te...> - 2004-03-30 14:15:44
|
Hello: > I hope this can help. I have done a little test and it's running fine for me, heres is my test case: FbConnection connection = new FbConnection(connectionString); connection.Open(); string sql = "SELECT * FROM TEST"; FbDataAdapter adapter = new FbDataAdapter(sql, connection); FbCommandBuilder builder = new FbCommandBuilder(adapter); FbCommand i = builder.GetInsertCommand(); FbCommand d = builder.GetDeleteCommand(); FbCommand u = builder.GetUpdateCommand(); connection.Close(); -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Gianfranco G. <ggi...@se...> - 2004-03-30 16:55:10
|
Carlos You are right. Everything work fine. Thanks for your quik responses. Carlos, by the way, congratulations for your DotNet Data Provider, in the 1.5.2 and 1.6 Beta 1 versions, the perfomance has been greatly improved. En hora buena amigo, apreciamos mucho tus importantes contribuciones a esta comunidad. Estas desarrollando un excelente Producto. Best Regards - Cordiales Saludos Gianfranco "Carlos Guzmán Álvarez" <car...@te...> wrote in message news:406...@te...... > Hello: > > > I hope this can help. > > I have done a little test and it's running fine for me, heres is my test > case: > > > FbConnection connection = new FbConnection(connectionString); > connection.Open(); > > string sql = "SELECT * FROM TEST"; > > FbDataAdapter adapter = new FbDataAdapter(sql, connection); > FbCommandBuilder builder = new FbCommandBuilder(adapter); > > FbCommand i = builder.GetInsertCommand(); > FbCommand d = builder.GetDeleteCommand(); > FbCommand u = builder.GetUpdateCommand(); > > connection.Close(); > > > > > -- > Best regards > > Carlos Guzmán Álvarez > Vigo-Spain > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |
From: Gianfranco G. <ggi...@se...> - 2004-03-30 22:30:30
|
Hi The problem was that in the FbConnection object the Open method now it's required. Best Regards Gianfranco ""Gianfranco Giannotti"" <ggi...@se...> wrote in message news:c4c7ce$hqj$1...@ne...... > Carlos > > You are right. Everything work fine. > > Thanks for your quik responses. > > Carlos, by the way, congratulations for your DotNet Data Provider, in the > 1.5.2 and 1.6 Beta 1 versions, the perfomance has been greatly improved. > > En hora buena amigo, apreciamos mucho tus importantes contribuciones a esta > comunidad. Estas desarrollando un excelente Producto. > > Best Regards - Cordiales Saludos > Gianfranco > > "Carlos Guzmán Álvarez" <car...@te...> wrote in message > news:406...@te...... > > Hello: > > > > > I hope this can help. > > > > I have done a little test and it's running fine for me, heres is my test > > case: > > > > > > FbConnection connection = new FbConnection(connectionString); > > connection.Open(); > > > > string sql = "SELECT * FROM TEST"; > > > > FbDataAdapter adapter = new FbDataAdapter(sql, connection); > > FbCommandBuilder builder = new FbCommandBuilder(adapter); > > > > FbCommand i = builder.GetInsertCommand(); > > FbCommand d = builder.GetDeleteCommand(); > > FbCommand u = builder.GetUpdateCommand(); > > > > connection.Close(); > > > > > > > > > > -- > > Best regards > > > > Carlos Guzmán Álvarez > > Vigo-Spain > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > _______________________________________________ > > Firebird-net-provider mailing list > > Fir...@li... > > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |
From:
<car...@te...> - 2004-03-31 10:52:07
|
Hello: > The problem was that in the FbConnection object the Open method now it's > required. Are you sure ?? this sample works for me: FbConnection connection = new FbConnection(connectionString); string sql = "SELECT * FROM PROJECTS"; FbDataAdapter adapter = new FbDataAdapter(sql, connection); FbCommandBuilder builder = new FbCommandBuilder(adapter); FbCommand i = builder.GetInsertCommand(); FbCommand d = builder.GetDeleteCommand(); FbCommand u = builder.GetUpdateCommand(); -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Gianfranco G. <ggi...@se...> - 2004-03-31 15:01:18
|
Carlos your example works for me too. The "Connection lifetime=15" is the cause. The Connection is destroyed and an Exception is raised because the Connection Object = null. For that if I ReOpen de Connection everything works fine. But in the 1.5.2 version the behavior was different. If i'm wrong let me know. Kind Regards Gianfranco "Carlos Guzmán Álvarez" <car...@te...> wrote in message news:406...@te...... > Hello: > > > The problem was that in the FbConnection object the Open method now it's > > required. > > Are you sure ?? this sample works for me: > > FbConnection connection = new FbConnection(connectionString); > > string sql = "SELECT * FROM PROJECTS"; > > FbDataAdapter adapter = new FbDataAdapter(sql, connection); > FbCommandBuilder builder = new FbCommandBuilder(adapter); > > FbCommand i = builder.GetInsertCommand(); > FbCommand d = builder.GetDeleteCommand(); > FbCommand u = builder.GetUpdateCommand(); > > > > > > > -- > Best regards > > Carlos Guzmán Álvarez > Vigo-Spain > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |