Last post May 09, 2013 05:59 AM by Pengzhen Song - MSFT
May 08, 2013 11:11 AM|Dave04|LINK
I am trying to send multiple records back to the database simultaneously by passing a datatable as a parameter to the sqldatasource update however I cannot seem to find the correct type (i.e. form, control, session, etc.).
I did try storing the datatable in a session and pass that as a parameter however I get error message "The table type parameter
'@table' must have a valid type name".
If there is a better way of sending a datatable back to the database it would be gretly appreciated if someone could reply.
I am very new to asp.net.
May 08, 2013 11:13 AM|ashkc|LINK
you need to give sqlDBType.Structured for this
May 08, 2013 11:18 AM|oned_gk|LINK
May 08, 2013 11:43 AM|Dave04|LINK
Thank you oned_gk but I have already tried changing to table1 but still receive same error.
May 08, 2013 11:49 AM|Dave04|LINK
Thank you ashkc
I will look this up and give it a try.
May 09, 2013 05:59 AM|Pengzhen Song - MSFT|LINK
Try using the XML features of SQL Server (depending upon the version of SQL Server you are using), rather than trying to pass a table parameter.
source from http://forums.asp.net/t/1033159.aspx
And refer the similar thread
Hope it can help you