Click here to Skip to main content
16,017,788 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I need your help. I need to insert "Multiple field values in same Column".

I will explain my issue clearly.

I have "CustomerMaster". It contain TaxDetails. The TaxDetails contains six Fields. TinNo, CstNo, ExciseRegNo,PanNo,ServiceTaxNo, CinNo.

The Database contains the three tables to save Tax Details.

1)TaxField, 2)TaxInfo, 3)TaxInfoTaxField

1)TaxField

TaxFieldID, DisplayName , PrintName.

2)TaxInfo

TaxInfoId, DisplayName, PrintName

3)TaxInfoTaxField


TaxInfoTaxFieldId, TaxInfoID, TaxFieldID, FieldValue.

Now i need to save that six Fields(**TinNo, CinNo, PanNo, CstNo, ExciseRegNo, ServiceTaxNo )**in these Tables.. I will explain Clearly.

In TaxFieldTable contain TaxFieldID, DisplayName,PrintName. In this Table I have Defalut value . That is

TaxField table

TaxFieldID = 1, DisplayName = TinNo, PrintName = TinNo.

If "TinNo" means its valuse is "1" Same as like CstNo and PanNo.

TaxInfo table


TaxInfoID = 1.1, DisplayName = Kallam Spinning Mill, PrintName = Kallam Spinning Mill.

TaxInfoTaxField table


TaxInfoTaxFieldId = 1.1.1, TaxInfoId= 1.1, TaxFieldId = 1, FieldValue = 1234567

(i am able to paste the table)

In View I have Six Fields.

If i insert TinNo ,CstNo, PanNo, ExciseRegNo, CinNo,ServiceTaxNo, values in view it need to save these six field values in FieldValue of TaxInfoTaxField Table. and ID of TinNo(Tinno = 1) , CstNo(CstNo = 2) have to save in TaxFieldID of TaxInfoTaxField Table.

I need to save these six Fields in single Column and there id's in TaxFieldID Column.I think its create 6 rows for a each Customer. I want to know " How to Insert Multiple value in Single Column in Db using MVC4? I need solution for this problem . its very urgent dudes.

Anyone please reply.. Thanks





Thanks in advance..
Posted
Updated 28-Nov-15 19:11pm
v3
Comments
Sinisa Hajnal 30-Nov-15 3:31am    
First of all, it is urgent to you, not to any of us. Second, you didn't show nor mentioned anything to show what you've tried or at least read about. You know, show that you tried and you couldn't resolve it by yourself.
Finally, spamming the sites with your question just means that if someone googles similar text will find your question instead of the answer:
http://forums.asp.net/t/2078789.aspx?How+to+insert+multiple+Filed+Value+into+same+column+of+table+in+MVC4+
http://stackoverflow.com/questions/33970544/how-to-insert-multiple-field-values-into-same-column-of-table-in-mvc4


Here is something that might, or might not, help you and which you would find if you googled How to insert multiple value in single column (it was the result, right after all your repeated question)

http://www.dotnetawesome.com/2014/08/how-to-insert-multiple-record-to-database-at-a-time-aspnet-mvc4.html

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