-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text fields in local NASIS are truncated at 255 characters #145
Comments
Interesting. Perhaps an interaction with {RODBC} package, as with {DBI}+{odbc} I get max 1500 characters not 255.
|
That is odd, RODBC has worked for a long time without issue. Any thoughts on switching over? Is the 1500 limit a self-imposed limit or the driver? |
I have wondered whether something might happen that would tip the tables in favor of DBI/odbc. Until that little snafu with R 4.0/Rcpp i hadn't seriously considered it. If i drop the _View_1 from the query I get 9999 which IIRC is the max for that field in nasis. So, 1500 is max in my selected set (I have ~all 2-SON projects I think) |
Castting varchar to ntext seems to do the trick with {RODBC}.
|
That is a good temporary fix, but maybe a long-term strategy is to switch over to |
This seems to have been known behavior for some time, but we were way behind the curve with updating to this new MS SQL driver... I found related issues dating back almost 10 years but the above one seems most relevant. I would support moving to DBI/odbc. |
Explanation from Brian Ripley. I guess the answer is to go to DBI/odbc if we want a more "sane" default for
|
That is nice and reason enough to switch over: much simpler than the DB layout PDFs or manual inquiry. This issue started as part of QA but there are pending tasks which could be affected by this new (old) bug. Map unit text notes, certification notes, and possibly even some aspects of calculations / interpretations. I have not tested those yet but they do make use of very large text chunks. I'm going to do some testing and then make the case for a full transition to {DBI} / {odbc}. Done here, moving on to #146. |
Here are a couple interesting links related to getting long data from MS SQL -- it appears that nanodbc (used by {odbc}) has said that this is essentially not their problem to fix, and it is clear that Microsoft has no intention of fixing it -- it appears to be a "feature" not a "bug" that appeared after moving from "SQL Server" driver to later MS drivers. I am not sure why {odbc} seems to handle this case "better" out of the box since it is apparently related to the MS side of things... may just be that nanodbc is a bit more sensible, or they have addressed this some other way in odbc. https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/getting-long-data?view=sql-server-ver15 |
This seems to have occured after the recent switch to a newer ODBC driver.
Put something into your selected set and try it.
The text was updated successfully, but these errors were encountered: