Skip to content

Commit ece0bfc

Browse files
Fix error "Can't write CLR type System.Guid with handler type TextHandler" when running with npgsql 5.0.7. (#786)
1 parent bb177a2 commit ece0bfc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dotnet/src/dotnetframework/GxClasses/Data/GXDataPostgreSQL.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,14 @@ public override long GetBytes(IGxDbCommand cmd, IDataRecord DR, int i, long fiel
313313
return count;
314314
}
315315
}
316-
//ByteArrayToByteaTextEscaped
316+
public override void SetParameter(IDbDataParameter parameter, object value)
317+
{
318+
if (value is Guid)
319+
{
320+
value = value.ToString();
321+
}
322+
base.SetParameter(parameter, value);
323+
}
317324
public override void SetBinary(IDbDataParameter parameter, byte[] byteArray)
318325
{
319326
if (_byteaOutputEscape)

0 commit comments

Comments
 (0)