insert data to new table

xswzaq

Well-known member
Joined
Jul 9, 2007
Messages
61
Programming Experience
Beginner
I have this table, and what I want is when the users update something, it will not goes out and update the data instead it will create new table, and put the update information to the new table. The old the data should be the same and there will be new table so that the update will goes to that table. Is there a way to do it? If yes? How? and Thank you?
 
it not duplicated because the first table have some column which did not include in the second table, and I don't want to mess up the first table. The second table should be totally new and users will uses the first table to create the second one.
 
so where is your database? Is it on an SQL Server, or is it within your application (i.e. every user of your application then has their own database)

Your first post isn't exactly clear what you are wanting to achieve. The issues I see are everytime this "form" or part of your app is run, it will end up creating an extra table - after a while this is going to get very very messy!
 
the table I got is on the SQL SERVER. You right, every time I run, the datagridview always add new records (and worst is that every column on my datagrid is linking/relate to other column in different table). So far there is not new table add yet, but alot of new records is comming in.
 
I would simply do an insert statement on a stored procedure. Creating a new table for each instance of a new record will only bog down your DB, and result in errors with the table names. INSERT INTO tblWhatever(params) VALUES(Params) etc...
 
I'm afraid that that's very suspect design. If your app needs tables in the database then they should be there from the start. If there's an existing database then you should be adding this new table when you install your app or on the first run, NOT when the user inserts some data.
 
I agree with the others. Creating a new table per record is plain up a dumb idea, and I dont think you'll find any industry expert to disagree with me..
 
Back
Top