From: Richard B. <rb...@us...> - 2005-04-21 23:00:43
|
Update of /cvsroot/jcframework/dotnet/Providers/AF_MSSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4502/Providers/AF_MSSQL Modified Files: CMsSqlConnection.vb Log Message: Changes to properly support MSSQL Guid columns Index: CMsSqlConnection.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/Providers/AF_MSSQL/CMsSqlConnection.vb,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CMsSqlConnection.vb 11 Apr 2005 00:31:45 -0000 1.3 +++ CMsSqlConnection.vb 21 Apr 2005 23:00:34 -0000 1.4 @@ -215,6 +215,11 @@ param = New SqlParameter param.ParameterName = cp.Name param.SqlDbType = CType(cp.Column.ProviderType, SqlDbType) + If param.SqlDbType = SqlDbType.UniqueIdentifier Then + If TypeOf cp.Value Is String Then + cp.Value = New Guid(CType(cp.Value, String)) + End If + End If If TypeOf (cp.Value) Is DateTime Then dd = cp.Value If dd.Ticks = 0 Then @@ -271,6 +276,11 @@ param = New SqlParameter param.ParameterName = cp.Name param.SqlDbType = CType(cp.Column.ProviderType, SqlDbType) + If param.SqlDbType = SqlDbType.UniqueIdentifier Then + If TypeOf cp.Value Is String Then + cp.Value = New Guid(CType(cp.Value, String)) + End If + End If If TypeOf (cp.Value) Is DateTime Then dd = cp.Value If dd.Ticks = 0 Then |