Skip to content

Commit ec17328

Browse files
xucs007SingingBush
xucs007
authored andcommitted
fix mysql date and datetime type
1 parent 6930ae5 commit ec17328

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

source/ddbc/drivers/mysqlddbc.d

+1-3
Original file line numberDiff line numberDiff line change
@@ -1085,9 +1085,7 @@ public:
10851085
return 0;
10861086
if (v.convertsTo!(long))
10871087
return v.get!(long);
1088-
else if (v.convertsTo!(string))
1089-
return v.get!(string).to!long;
1090-
throw new SQLException("Cannot convert field " ~ to!string(columnIndex) ~ ": '" ~ v.toString() ~ "' to long. type=" ~ v.type.to!string);
1088+
throw new SQLException("Cannot convert field " ~ to!string(columnIndex) ~ ", " ~ metadata.getColumnName(columnIndex) ~ ": '" ~ v.toString() ~ "', to long. Its type=" ~ v.type.to!string);
10911089
}
10921090
override ulong getUlong(int columnIndex) {
10931091
checkClosed();

0 commit comments

Comments
 (0)