Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. My tables hate me

My tables hate me

Scheduled Pinned Locked Moved C#
helpcssdatabasequestiondiscussion
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Evan St John
    wrote on last edited by
    #1

    Using vs05, I open the Data Source view, then click the Add New Data Source thing. I add the database I want and all the tables show up. I can edit things using Edit DataSet with Designer without issue. Can preview data, and the results are what they are supposed to be. Problem: When I try to drag a table to a form I get the error: “Length cannot be less than zero. Parameter name: length” Any thoughts on what I’m neglecting to do here?

    C R 2 Replies Last reply
    0
    • E Evan St John

      Using vs05, I open the Data Source view, then click the Add New Data Source thing. I add the database I want and all the tables show up. I can edit things using Edit DataSet with Designer without issue. Can preview data, and the results are what they are supposed to be. Problem: When I try to drag a table to a form I get the error: “Length cannot be less than zero. Parameter name: length” Any thoughts on what I’m neglecting to do here?

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Seriously, don't use the wizards, don't drag and drop data connections. Write the code yourself - You'll be much happier, and it will work a lot better.


      Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

      B E E 3 Replies Last reply
      0
      • C Colin Angus Mackay

        Seriously, don't use the wizards, don't drag and drop data connections. Write the code yourself - You'll be much happier, and it will work a lot better.


        Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

        B Offline
        B Offline
        BoneSoft
        wrote on last edited by
        #3

        I'm glad somebody said that. I've never used the visual tools for database and was kinda starting to worry that I was missing out on something important. I even avoid using DataSets as much as possible, and I HATE the DataGrid.


        Try code model generation tools at BoneSoft.com.

        1 Reply Last reply
        0
        • E Evan St John

          Using vs05, I open the Data Source view, then click the Add New Data Source thing. I add the database I want and all the tables show up. I can edit things using Edit DataSet with Designer without issue. Can preview data, and the results are what they are supposed to be. Problem: When I try to drag a table to a form I get the error: “Length cannot be less than zero. Parameter name: length” Any thoughts on what I’m neglecting to do here?

          R Offline
          R Offline
          rowdykuttan
          wrote on last edited by
          #4

          r u using windows or webapplication ?

          E 1 Reply Last reply
          0
          • R rowdykuttan

            r u using windows or webapplication ?

            E Offline
            E Offline
            Evan St John
            wrote on last edited by
            #5

            Well, in this current edition… I’m developing in CE for little RF devices with almost no memory. I’m going to try doing this programmatically, as was suggested, and see what happens. Considering the lack of processing power on these things, I’m thinking about moving all processing to a server and accessing through WebMethods. Assuming I don’t take a baseball bat to my computer :D

            1 Reply Last reply
            0
            • C Colin Angus Mackay

              Seriously, don't use the wizards, don't drag and drop data connections. Write the code yourself - You'll be much happier, and it will work a lot better.


              Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

              E Offline
              E Offline
              ESTAN
              wrote on last edited by
              #6

              How come it that you took the words out of my mouth? I can only agree, i made the connections only once in one nice class and i reuse it in all my projects :-)

              C 1 Reply Last reply
              0
              • E ESTAN

                How come it that you took the words out of my mouth? I can only agree, i made the connections only once in one nice class and i reuse it in all my projects :-)

                C Offline
                C Offline
                Colin Angus Mackay
                wrote on last edited by
                #7

                ESTANNY wrote:

                How come it that you took the words out of my mouth?

                It wasn't intentional. But the shock must have been quite something - It took you over 4 hours to recover and let me know! :rolleyes:


                Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

                1 Reply Last reply
                0
                • C Colin Angus Mackay

                  Seriously, don't use the wizards, don't drag and drop data connections. Write the code yourself - You'll be much happier, and it will work a lot better.


                  Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

                  E Offline
                  E Offline
                  Evan St John
                  wrote on last edited by
                  #8

                  This has so got to be a CE thing... because if I do what I’m trying in the full-blown framework, I’ve no problems at all. In this CE, I can connect to the database using the wizards but, if I write the connection string, it refuses to connect. It’s the same string, I copied it right out of the designer. The length = 0 thing(from the first post) magically disappeared (no idea why, I didn’t do anything different when it stopped) but now even dropping a table on a form will give me a disturbingly vague “SQLException” error.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups