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
Support Char Parameter Type #205
Comments
The char type is sadly not currently supported as a parameter type. Notice it's missing from the parameter column in the documentation too. That's not a great answer, I know. Apparently you're the first one who has tried to use it and complained. Someone just needs to write an implementation for it. Shouldn't be incredibly difficult. The relevant TDS documentation starts here. If you want to take a crack at it, feel free. I doubt I would be able to get to this until sometime next week, though I can't speak for the other maintainers. |
@masterots |
@krisklosterman you just need to make it work as a parameter type. Bulk insert should work automatically if it works as a parameter. |
There's a lot of context around this, but basically, I have some csv data parsed, I know based on column name and table what the data type is, if it's nullable, and its maxlength. I can't post a whole lot, since it's being used for a private corporate project.
|
I think I may have this working. The below code now inserts into my database
Database Structure
I am still getting used to GIT and have not contributed to a github project before, currently I cloned the project and modified some files. How do I go about creating a branch and gitting it up so that it can be reviewed, and then merged? |
Created A Pull request from a Fork, let me know if that was done correctly (Check post above this) |
Support for Char and NChar will be added in version 1.7.0 later today. |
When doing a bulk load, I am getting the error
TypeError: Object #<Object> has no method 'writeParameterData'
when the column datatype is of type char.Looking at the source code, writeParameterData does not exist on that type, therefore I get the error.
Was this overlooked, or am I doing something wrong here? I'm making sure to set the appropriate value of TYPES.Char, passing it as a string when creating the row.
The text was updated successfully, but these errors were encountered: