Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32259
Modified Files:
AdoTemplate.cs
Log Message:
SPRNET-796 - AdoTemplate not using DbMetadata for CommandBuilderDeriveParamtersMethod
Index: AdoTemplate.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core/AdoTemplate.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AdoTemplate.cs 4 Dec 2007 06:52:19 -0000 1.7
--- AdoTemplate.cs 6 Dec 2007 06:21:25 -0000 1.8
***************
*** 2617,2621 ****
//The DeriveParameter is static in all providers...it seems....
Type commandBuilderType = provider.DbMetadata.CommandBuilderType;
! commandBuilderType.InvokeMember("DeriveParameters",
BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod, null, null,
new object[] { command });
--- 2617,2621 ----
//The DeriveParameter is static in all providers...it seems....
Type commandBuilderType = provider.DbMetadata.CommandBuilderType;
! commandBuilderType.InvokeMember(provider.DbMetadata.CommandBuilderDeriveParametersMethod.Name,
BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod, null, null,
new object[] { command });
***************
*** 2635,2639 ****
}
}
- //AdoRowCallbackCommandCallback
private class AdoRowCallbackCommandCallback : ICommandCallback
--- 2635,2638 ----
***************
*** 2736,2765 ****
- private class ExecuteNonQueryCallback : ICommandCallback, ICommandTextProvider
- {
- private CommandType commandType = CommandType.Text;
- private string commandText;
-
- public ExecuteNonQueryCallback(CommandType cmdType, string cmdText)
- {
- commandType = cmdType;
- commandText = cmdText;
- }
-
- public string CommandText
- {
- get { return commandText; }
- }
-
- public Object DoInCommand(IDbCommand command)
- {
- command.CommandType = commandType;
- command.CommandText = commandText;
- return command.ExecuteNonQuery();
- }
- }
-
-
-
private class ExecuteNonQueryCallbackWithParameters : ICommandCallback, ICommandTextProvider
{
--- 2735,2738 ----
|