|
-
Feb 11th, 2011, 12:26 PM
#1
Thread Starter
New Member
INSERT unbound data into SQL Database table
Hi All
My application uses a datagridview to allow a user to enter data to create new Companies, Employees etc.
The data entry happens on a datagridview. Some of the data entered is mandatory and some is optional. How do i loop through the datagrid view ensuring that at least all Mandatory information is supplied and then INSERT the data.
This is the datagridview structure:
Col(0) ID column
Col(1) Description Column ie Company Name
Col(3) Value Column ie "ABC Company"
Col(4) Optional / Mandatory indicator
The conditions that must be met to insert data are:
- Col(0) must contain a value
- If Col(4) is "Mandatory" Then Column 3 must have a value
The insert statement is very simple, its the firing of the insert statement based on the conditions for each row in the datagridview that is the issue.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|