Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all visitors
I have created a datasource to my database.

I want to add new data to my table by using sqlBindingSource and SqlTableAdapter. But on my Form, I just got some columns of the table only.

I mean that in my table, there are 5 columns but on the form I just show only 4 columns. because other columns are columns that get data from variable.

Ex: columns in table(sale_code, cust_code, emp_code, saledate, amount) and it show on the form are (sale_code, Cust_code, Saledate, amount).

For emp_code column will be assigned when Log In.

How can I add all columns (salecode, custcode, empcode, saledate, amount) to my table?

Best Regards,
Posted
Updated 30-Mar-11 13:45pm
v2
Comments
Henry Minute 30-Mar-11 19:47pm    
Please tell us what you are using to display your data. Is it a DataGridView or individual controls?
soeun tony 30-Mar-11 22:17pm    
Thanks for ur reply
I use GridView to display
ZeeroC00l 31-Mar-11 3:09am    
How are you displaying the details currently in your GridView ? i mean you must be using the select querry right. Could you please update your question with your querry/code.
Albin Abel 31-Mar-11 10:12am    
I think you fill your table with all required columns. But only display necessary column in the data grid. Update the data table from the varibles and then execute the data adapter's update command.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900