in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Dataviewset connection object

Last post 08-08-2007 8:04 AM by C1_AlexI. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-06-2007 8:18 AM

    Dataviewset connection object

    Hi,

    I am testing the Dataviewset component, in which I created a SQLConnection object and assigned it to the connection property of the dataviewset. When I run the app, after the connection reference is assigned, the dataviewset object just got nothing retrieved. Actually the app was not hang, it just seemed the program got something else to run, and prevented the codes after the assignment statement (dataviewset.connection = locnn, which locnn is a SQLConnection variable) to be executed.

    Then I set a break point inside the ConnectionOpening event, it was found out that this event has been raised for multiple times (I guess more than 5 times); after that the execution just went to somewhere I didn't know, and the program could not go further. The Visual Studio environment was still very responsive, it was just look like the program was step into an infinite loop or something like that.

    Later I tried to use a connection string instead, but the problem persisted; I even attempted to set the connection string during the design time. Anyway, as long as the code started to put something into the connection property, the same problem would occur.

    BTW, I tried uninstall C1Studio and see if reinstallation would help, and it didn't work.

    Could anyone help me please?


    Jimmy
  • 08-06-2007 9:10 AM In reply to

    Re: Dataviewset connection object

    Hi Jimmy
     
    C1DataViewSet doesn't create its views (C1DataView objects which are members of the C1DataViewSet.Views collection) automatically when you assign the C1DataViewSet.Connection property. This assignment only forces C1DataViewSet to retrieve database schema and create a corresponding internal DataSet object (referencing via the C1DataViewSet.DataSet property). The views should be added manually, either in design-time by means of the C1DataViewSet Editor or in run-time by adding view objects in the C1DataViewSet.Views collection.
     
    Thanks,
    Alex
    <WonderJimmy> wrote in message news:197393@test.componentone.com...
    Hi,

    I am testing the Dataviewset component, in which I created a SQLConnection object and assigned it to the connection property of the dataviewset. When I run the app, after the connection reference is assigned, the dataviewset object just got nothing retrieved. Actually the app was not hang, it just seemed the program got something else to run, and prevented the codes after the assignment statement (dataviewset.connection = locnn, which locnn is a SQLConnection variable) to be executed.

    Then I set a break point inside the ConnectionOpening event, it was found out that this event has been raised for multiple times (I guess more than 5 times); after that the execution just went to somewhere I didn't know, and the program could not go further. The Visual Studio environment was still very responsive, it was just look like the program was step into an infinite loop or something like that.

    Later I tried to use a connection string instead, but the problem persisted; I even attempted to set the connection string during the design time. Anyway, as long as the code started to put something into the connection property, the same problem would occur.

    BTW, I tried uninstall C1Studio and see if reinstallation would help, and it didn't work.

    Could anyone help me please?


    Jimmy


    http://home.componentone.com/cs/forums/197393/ShowPost.aspx

  • 08-06-2007 9:28 AM In reply to

    Re: Dataviewset connection object

    Hi Alex,

    Thanks for your prompt reply.

    The fact is, I did create a view through the designer. But as long as I touched the connection parameter of the viewset, the problem occurred.

    I just tried again, after a while (more than 10 minutes) the StackOverflow exception was caught. It seemed somehow the code fall into an infinite loop or infinite recursion.

    Do you have any idea?


    Thanks and Regards,

    Jimmy
  • 08-07-2007 6:12 AM In reply to

    Re: Dataviewset connection object

    Jimmy
     
    Please let me know what version of the SQL server you connect to and what version of C1DataExtender do you use.
     
    TIA,
    Alex
    <WonderJimmy> wrote in message news:197398@test.componentone.com...
    Hi Alex,

    Thanks for your prompt reply.

    The fact is, I did create a view through the designer. But as long as I touched the connection parameter of the viewset, the problem occurred.

    I just tried again, after a while (more than 10 minutes) the StackOverflow exception was caught. It seemed somehow the code fall into an infinite loop or infinite recursion.

    Do you have any idea?


    Thanks and Regards,

    Jimmy


    http://home.componentone.com/cs/forums/197396/ShowPost.aspx#197398

  • 08-07-2007 10:30 AM In reply to

    Re: Dataviewset connection object

    Hi Alex,

    Here it is:

    SQL Server: SQL Server 2005 Express (9.00.3042.00)
    C1DataExtender: 2.0.20063.36
    .Net Framework: 2.0.50727



    Jimmy
  • 08-08-2007 8:04 AM In reply to

    Re: Dataviewset connection object

    Hi Jimmy
     
    Thanks for the info. Please try the following:
     
    1) Your C1DataExtender build is not fresh, please try the following one:
     
    2) Make sure that tables in your database has primary keys defined. C1DataExtender ignores tables without primary keys.
     
    If neither of above will help, the only I could suggest is to provide me with a problem *.mdf file.
     
    Thanks,
    Alex
     
    <WonderJimmy> wrote in message news:197445@test.componentone.com...
    Hi Alex,

    Here it is:

    SQL Server: SQL Server 2005 Express (9.00.3042.00)
    C1DataExtender: 2.0.20063.36
    .Net Framework: 2.0.50727



    Jimmy

    http://home.componentone.com/cs/forums/197438/ShowPost.aspx#197445

Page 1 of 1 (6 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.