I am pretty much new using SQL and I am in the midst of trying to add data to a table from inside my program.
In a nutshell, as long as I do not have a primary key set on my table I can fill the table fairly easily. I use this statement:
LogEntry.DataEntryTableAdapter.Insert(Now.ToString, SCF(0), SCF(1), SCF(2), SCF(3), SCF(4), SCF(5), SCF(6))
However, I really need a primary key and when I make a table with a field that has one I can create an error.
Is there an easy way to get the primary key to update itself automatically? I tried to simply removing the colum from my datagridview, but the insert commmand still wants me to input data.
any help is appreciatted. thank you.
In a nutshell, as long as I do not have a primary key set on my table I can fill the table fairly easily. I use this statement:
LogEntry.DataEntryTableAdapter.Insert(Now.ToString, SCF(0), SCF(1), SCF(2), SCF(3), SCF(4), SCF(5), SCF(6))
However, I really need a primary key and when I make a table with a field that has one I can create an error.
Is there an easy way to get the primary key to update itself automatically? I tried to simply removing the colum from my datagridview, but the insert commmand still wants me to input data.
any help is appreciatted. thank you.