Re: ODBC bcp
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAHt6W4fxWKuGGbiqJ3hNRoT9v6VGDB12gCR7yfmcpR=5H+Zwjg@mail.gmail.com> |
2015-03-30 22:03 GMT+01:00 Richard Hughes <[email protected]>: > Here's my v3 patch (hopefully in a slightly more gitish format - still > trying to figure out which of the various workflows on offer is > appropriate). > > I think I've addressed everything discussed, including redoing how the > new functions are called, adding some more stuff to the unit test and > fixing a few bugs thereby found. > > I've got a couple of questions outstanding: > > 1) I think I've found a bug in Microsoft's sqlncli11: inserting from > an application type of SQL_NUMERIC_STRUCT to a column of type varchar > appears to ignore the 'scale' of the decimal. This is commented in the > unit test, but causes an attempt to insert 3.141593 > (SQL_NUMERIC_STRUCT) to come out as '3141593' (varchar). What's the > general policy for things like this? Do we attempt bug-compatibility? > I don't imagine many people will want this particular conversion - I > only spotted it by accident. > > 2) I'm testing inserting to a datetime2 column. It works fine but > tcpdump shows that it's actually being sent as a nvarchar over the > wire, not binary. I'm assuming this is not my fault, but rather an > underlying problem in src/tds/bulk.c which should be treated as a > separate patch. If you think it is my fault then I'd appreciate it if > you could point out where I might have gone wrong. > > Richard. A note about inline. inline is actually C99 which is already 16 years old. If compilers does not support inline I would prefer a #define inline something instead of using a TDSODBC_INLINE Frediano