129{
130 String srcDriver;
131 String dstDriver;
132
133 size_t first = _args.
source().search(L
"DRIVER *=",
true);
134 if (first != (size_t)-1) {
135 srcDriver = _args.
source().substring(L
"DRIVER *= *[^;]+",
true);
136 if (srcDriver.isEmpty()) {
137 srcDriver = _args.
source().substring(first);
138 }
139 if (!srcDriver.isEmpty()) {
140 if (srcDriver.indexOf(L'{') != (size_t)-1) {
141 srcDriver = L"DCLODBC";
142 }
143 else {
144 srcDriver = srcDriver.substring(srcDriver.indexOf(L'=') + 1).trim();
145 }
146 }
147 }
148
149 first = _args.
destination().search(L
"DRIVER *=",
true);
150 if (first != (size_t)-1) {
151 dstDriver = _args.
destination().substring(L
"DRIVER *= *[^;]+",
true);
152 if (dstDriver.isEmpty()) {
154 }
155 if (!dstDriver.isEmpty()) {
156 if (dstDriver.indexOf(L'{') != (size_t)-1) {
157 dstDriver = L"DCLODBC";
158 }
159 else {
160 dstDriver = dstDriver.substring(dstDriver.indexOf(L'=') + 1).trim();
161 }
162 }
163 }
164
165 if (srcDriver.isEmpty() || dstDriver.isEmpty()) {
166 _args.errout() << _args.value0() << L": option '--source' or '--destination' is invalid"
168 return;
169 }
170
172 if (copy.initialize()) {
173 copy.doIt();
174 }
175}
DCLCVAR const struct __endl endl
const String & destination() const
const String & source() const