in

System.Data.SQLite

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

Problem with datagrid synching

Last post 05-13-2007 5:30 AM by g18c. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-17-2006 4:13 PM

    • jimflo
    • Top 500 Contributor
    • Joined on 06-17-2006
    • Posts 3

    Problem with datagrid synching

     I'm very new to this and to 2005. I'm writing an app for offline data entry and Sqlite seems ideal and I'm impressed with what I've seen so far.

    I tested the data sources with data from the MSDE Nortwind test datbase to amke sure I got the data binding correct for customers and orders, you have to start somewhere :0), and that all worked fine. When I moved the customer the bottom grid for orders filled with the correct customer orders.

    I tried the same with Sqlite and I can't get the same to work. I modified a test script I found for albums and tracks

    CREATE TABLE album(
      id CHAR(10) NOT NULL PRIMARY KEY,
      title VARCHAR(100),
      artist VARCHAR(100));

    CREATE TABLE track(
      album CHAR(10),
      dsk INTEGER,
      posn INTEGER,
      song VARCHAR(255),
      FOREIGN KEY (album) REFERENCES album(id));

    and the binding source and tracking source look the same as the MDSE version I tried but the bottom datagrid tracks is not syncing. I'm probably missing something very basic so apologies in advance

    Jim Florence



  • 06-17-2006 4:31 PM In reply to

    Re: Problem with datagrid synching

    I'll try and duplicate the issue on my side -- if I have trouble, I may need you to send me a test app and database.

    Robert

     

  • 06-17-2006 5:04 PM In reply to

    • jimflo
    • Top 500 Contributor
    • Joined on 06-17-2006
    • Posts 3

    Re: Problem with datagrid synching

        Robert,

    Thanks for the VERY quick reply. I created some very basic test data against those tables, 2 albums and 2 tracks per album. If you cant replicate it I'll happily send you the files

    Regards

    Jim
  • 06-17-2006 5:31 PM In reply to

    • jimflo
    • Top 500 Contributor
    • Joined on 06-17-2006
    • Posts 3

    Re: Problem with datagrid synching

    Robert,

    After much hair pulling I re-created the database from scratch, twice, and it now seems to be working. That's the umpteenth time I've done it so goodness knows what's been happening.

    Sorry for this but I was at it for a whole day before I posted and now it seems to just work, I hate computers :0)

    Jim
  • 05-13-2007 5:30 AM In reply to

    • g18c
    • Top 500 Contributor
    • Joined on 05-13-2007
    • Posts 4

    Re: Problem with datagrid synching

    Hi, This is exactly the same kind of demo i am trying to create, a master/details form. Can this all be done by adding the data sources and dropping onto the form, or do you have to start coding the datagrid datasources?

    Regarding Foreign Keys, i couldnt find any info about explicitly defining these, i was using SQLite Maestro and it has no mention of them in the app. Are FK required for the code generator to work properly, or do i need to define them in the datasource relationship view? Should i stick to hand generating tables by code rather than tools?

    Any pointers on how to do this would be much appreciated.

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