>> IMHO It sounds like you are doing something that the table adaptor might >> not be the best fit for. I have never been a big fan of loading a >> million records (or anything close to that in a data set) on a client >> machine. No matter what solution you use to refresh you data it's going >> to be expensive on the server and the client. You may want to consider >> writing a stored procedure for your inserts that has a returning value >> of the generator for each insert that you do. Then instead of using a >> table adaptor, you can write a class and use a generic collection to >> store the data (much faster). You will have to write the S,I,U,D methods >> yourself, but you can then capture the return values for each row you >> updated or insert. This is a very common practice where I work, and then >> it is easy to get the row ID of the row being inserted.
>I already wrote ORM library and it uses generics, nullable types, >anonymous delegates and so on. We use this libruary with object >datasourcec in ASP.NET projects, but it's not convenient as for me to >use such library for desktop applications. My friend, from a logical standpoint what you are trying to accomplish is not a drag and drop functional operation. What you are asking the adapter to do is look at my table, insert/update any new rows, and get the changes. So from that stand point you need to call the update method on you data adapter and then fill the adapter again, but that is expensive. For optimum performance, you NEED to use the returning statement in your SQL code if you are looking to just update a row with generator information. If you already have an OR mapper then add an output parameter that has the same name as the returning statement in your Stored Procedure, call the procedure and update your record with the return value. If you need visual drag and drop use object binding and be done with it. You can do this with a data table, but once again it is more expensive (resource wise) to iterate and update a data set than a collection. If you require drag and drop functionality for you class you can add that functionality directly to the class (Write me an email and I will send you some sample code). The people that support the Firebird .net provider are some of the most knowledgeable programmers I have encountered. They go to great lengths to support their product, and answer questions faster than most larger companies. Thanks, Steven Sramacher @ nospam.valleyit .net ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider