in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

'Refresh the data table' on a DataSet

Last post 11-30-2008 9:48 AM by Robert Simpson. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-15-2008 4:46 PM

    • rsloan
    • Not Ranked
    • Joined on 11-15-2008
    • Posts 3

    'Refresh the data table' on a DataSet

    Hello,

    I create a new DataSet by dragging a SQLite 1.0.60 table from the Server Explorer to the empty DataSet canvas.  The T_ID column is set for AutoIncrement=True.

    I then right-click on the adapter, click Configure then Advanced.  I check the 'refresh the data table' checkbox, OK then Finish.  I was expecting code to be generated that would select the new identity column after an insert but no such code was generated.  If it matters, visiting the Advanced screen shows the 'refresh the data table' unchecked again.

    In using the dataset, I see that the T_ID value on a single new row is not updated after a new row is inserted.

    VS2008 Professional and my table is this:

    CREATE TABLE t1
    (
    T_ID
    INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    LNAME NVARCHAR(50)
    ,
    FNAME NVARCHAR(50)
    );

    If my expectations are accurate, I thank you in advance for any suggestions or direction.

    Best regards,

    Robert

    Filed under:
  • 11-22-2008 9:59 PM In reply to

    • rsloan
    • Not Ranked
    • Joined on 11-15-2008
    • Posts 3

    Re: 'Refresh the data table' on a DataSet

    Hello-

    I've messed around with this some more and determined that the Visual Studio 2008 SQLite designer stuff just doesn't do what its supposed to.  Perhaps I've spent to much time in Microsofts SqlCE but, well, nothing works like I expect it to, if at all.

    Before I waste too much time, could anyone comment on the simple question of IF the Sqlite designer stuff works.  IF it works for someone somewhere, I'd at least have hope that it CAN work and might pursue Sqlite further.

    At the moment, all I really would like is to define the table above as a VS2008 DataSet and have the auto-increment work as it is documented to.  Maybe the documentation is wrong?  Who knows.  Does anyone actually successfully use Sqlite in the VS2008 DataSet designer and subsequently on a Winforms project?

    Regards,

    Robert

    Filed under:
  • 11-29-2008 8:53 PM In reply to

    • rsloan
    • Not Ranked
    • Joined on 11-15-2008
    • Posts 3

    Re: 'Refresh the data table' on a DataSet

    I wish this project all the best.  Turns out very little of it actually works as documented which, I guess, doesn't come as any surprise.  Oh well, maybe someday it will leave the lab and enter some sort of useability in the real world.

    All the best, I hope this project leaves the ground someday.

    Robert

  • 11-30-2008 9:48 AM In reply to

    Re: 'Refresh the data table' on a DataSet

    The refresh feature is hard-coded in the Visual Studio designers for the MS providers.  It's not extensible.  There are quite a few designer features, such as automatically adding the database to the project files, that are hard-coded inside Visual Studio.

    I too hope your projects one day leave the lab and enter the real world.  Personally, I find most people using the antiquated and buggy Type Dataset designer functionality of Visual Studio end up ripping that code out later and writing a more customized, extensible solution.

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems