I have 3 tables, one fr SALES, ITEM and SL_IT. SL_IT connects this two table with many to one relation with two FK for SALES and ITEM respectively and with QUANTITY as the third field.
Now i want to INSERT records, i do for SALES, and QUANTITY part in SL_IT table, and try to fetch the SALES and ITEM FK's from the database.
Now, while m trying to insert, i cant do that for FK's of SL_IT Table as they are fetched frm the database although i want to Input values into the QUANTITY column.
Can anyone tell me how to go about wt this..earlier when i tried, i got this ERROR msg.
"conversion from string to type 'integer' is not valid."
dont know where this error came from.
I am trying the above with the following codes:
Me.SALETableAdapter.Insert(Me.txtsalen.Text, Me.txtcustomerp.Text, Me.txtbilln.Text,
Me.DateTimePicker1.Value.ToShortDateString, Me.txtcustomern.Text,
Me.txtcustomera.Text, Me.txtbillamt.Text)
Me.SALETableAdapter.Fill(Me.KDBDataSet.SALE)
Me.SALETableAdapter.Update(Me.KDBDataSet.SALE)
sno = Val(Me.txtsalen.Text) ' Dont want user to retype the SaleNo
Me.SL_ITTableAdapter.Insert(icode, sno, txtquantityTextBox.Text)....??
' icode is Item code record to be fetched from the database...bit confused here
Me.SL_ITTableAdapter.Fill(Me.KDBDataSet.SL_IT)
Me.SL_ITTableAdapter.Update(Me.KDBDataSet.SL_IT)