In asp.net I’m inserting array values into a database but array elements are not inserted properly. Instead of that, System.String[] is inserted.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
System.String[] in the database implies that you are passing the string array directly to your database insert method.
Instead, you’ll need to loop through the array and insert the strings as individual rows:
Alternatively, you can flatten the array and insert into a single row like this:
This would insert the array as a comma-delimited list.