Hello Max,
For Strongly Typed Dataset, the DBDataAdapter has been wrapped by
TableAdapter class which generated by VS 2005 IDE. I assume the typed
dataset created by VS 2005. Please correct me if I misunderstand.
TableAdapter will define all the parameter for DBCommand which used for
executing Stored Procedure.
The type of each parameter in DBCommand should be the same the type as it
in Stored Procedure.
Otherwise, the error message will show up when we preview/execute the
DBCommand.
For OleDB, the type is System.Data.OleDb.OleDbType.Guid.
this._adapter.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("GID", System.Data.OleDb.OleDbType.Guid,
0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), " GID",
System.Data.DataRowVersion.Current, false, null));
For SQL Database, the type is System.Data.SqlDbType.UniqueIdentifier.
I guess the parameter has been defined as the wrong type.
In order to resolve the issue, we need more detailed information. Would you
please clarify the following question for me? Thanks.
1) Which Database is your application connects to? (SQL database or Access
file?)
2) What is the Store Procedure in the underlying database? (Could you paste
the source code of Store Procedure here? This will be helpful very much)
3) Does the typed Dataset's generated by VS 2005 IDE? If true, would you
please send me the DataSet.Designer.cs file? I will review on this. If
Typed Dataset created by yourself, would you please paste the code about
the DBCommand and each DBCommand's Parameter.
My alias is (e-mail address removed). I'm looking forward to your reply.
Have a great day.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.