Denaes Posted December 12, 2005 Posted December 12, 2005 I have two tables in a database (created in SQL 2005 Management Console) that are full on: Select, Insert, Update & Delete. One Table (we'll call it customers) has had everything generated for it dynamically. All the commands and each command has all the parameters created and the logic for Update/Insert that is very... exaustive. A huge WHERE block. The other Table (we'll call Address, isn't this DB unique!?) Has a dynamically generated Select & Insert command (complete with parameters and logic) but no Update or Delete command. For some reason the generated parameters are all unique to the command and leave the TableAdapter level paramaters empty. So I'd have to insert like 20 parameters and configure them manually - then make the SQL statements. I've removed the table and re-added it, I've redone the TableAdaptors queries with the configure option on the context menu. Now it wouldn't be terribly hard to to a DELETE and/or INSERT SQL statement. It would be annoying to create 20+ Parameters by hand. The reason I'm concerned is twofold: 1. By the time this project is done there will be at least 50 to 100 tables. maybe more. I want all non-customizable Commands done and done quick. We'll move to stored procedures, but we often need to test things quickly when we create a table to see how things work. 2. If I do create the parameters & commands for this table and I need to update the datasource at a later date, I'm afraid that whatever is causing these commands to not be created will remove the commands/parameters I create. Whats wrong? I don't know. Any errors with this floating around that I don't know of? Anything I can select differently that might cause this problem? Maybe a datatype that VS.Net doesn't like? Quote
Denaes Posted December 12, 2005 Author Posted December 12, 2005 Found the problem. ::drumroll:: I forgot to set a primary key in the database, so the dataset didn't know how to create the commands :eek: lets here it for small, yet very important mistakes :D Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.