29 lines
790 B
Diff
29 lines
790 B
Diff
From 6dfc261f3325e17e6a71b91a7af4eaa176ebe560 Mon Sep 17 00:00:00 2001
|
|
From: wang--ge <wang__ge@126.com>
|
|
Date: Wed, 14 May 2025 14:27:30 +0800
|
|
Subject: [PATCH] set default coltype to CHAR
|
|
|
|
---
|
|
src/apps/freebcp.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/apps/freebcp.c b/src/apps/freebcp.c
|
|
index f246ee5..564999d 100644
|
|
--- a/src/apps/freebcp.c
|
|
+++ b/src/apps/freebcp.c
|
|
@@ -618,7 +618,10 @@ file_native(BCPPARAMDATA * pdata, DBPROCESS * dbproc, DBINT dir)
|
|
|
|
for (i = 1; i <= li_numcols; i++) {
|
|
li_coltype = dbcoltype(dbproc, i);
|
|
-
|
|
+
|
|
+ if (li_coltype == -1)
|
|
+ li_coltype = SYBCHAR;
|
|
+
|
|
if (bcp_colfmt(dbproc, i, li_coltype, -1, -1, NULL, -1, i) == FAIL) {
|
|
fprintf(stderr, "Error in bcp_colfmt col %d\n", i);
|
|
return FALSE;
|
|
--
|
|
2.43.0
|
|
|