I am trying to configure my SQLDatasource for use with a RadGrid. The RadGrid has a FormTemplate for use in Insert and Updates. The database is in a SQL Server 2008 R2 server. The data selection process works fine however I am having an issue with the Insert process. If I configure the datasource for Insert by selecting a stored procedure the setup brings in all of the Insert stored procedure parameters correctly. When I try the Insert process I receive a SQL error "System.Data.SqlClient.SqlException: Procedure or function usp_WorkPackageInsert has too many arguments specified." Even though they match exactly. Then I tried to change the SQLDatasource to use TEXT and include the stored procedure with the @parameters in the correct order. If I try the insert process I receive an error, "Exception Details: System.Data.SqlClient.SqlException: Error converting data type decimal to decimal". Then I tried to manually set the parameter default values in the InsertCommand subroutine and get the "too many arguments specified." error. Then in the InsertCommand subroutine I tried to clear the Insert parameters and re-added them in the same order as they are in the stored procedure but that did not help. Lastly I decided to try hard coding the insert in the code behind page within the "GRID1_InsertCommand" subroutine using a SQLCommand, SQLConnection, etc and the Insert works. However, it leaves the Insert window open.
Only other issue I can think of is the data table is within a sub-schema, IE: sales.MyTable instead of dbo.Mytable. In all cases I have tried to include the schema reference in the Insert command and it did not help. I know the stored procedure works if I try to execute it in SSMS.
Any suggestions? Is there a way to close the Insert window if I have to resort to the manual insert using the SQLCommand?
Thanks in Advance, Jeff
Only other issue I can think of is the data table is within a sub-schema, IE: sales.MyTable instead of dbo.Mytable. In all cases I have tried to include the schema reference in the Insert command and it did not help. I know the stored procedure works if I try to execute it in SSMS.
Any suggestions? Is there a way to close the Insert window if I have to resort to the manual insert using the SQLCommand?
Thanks in Advance, Jeff