-
Notifications
You must be signed in to change notification settings - Fork 128
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
mssql.d :How to Insert a wstring? And sqlException not work #62
Comments
|
On Thu, Jan 15, 2015 at 07:36:03AM -0800, FrankLIKE wrote:
I would say just convert it to a string with import std.conv; to!string(your_wstring); That's not the most efficient but I'm pretty sure it would work. |
|
Thank you. |
|
toMBS function work ok,it can let the wstring in mssql db display ok. |
|
On Thu, Mar 26, 2015 at 09:32:52AM -0700, Zafer �elenk wrote:
It might be returning SQL_SUCCESS_WITH_DATA, my check there i think is Try changing line 159 to something like plain So removing the error checking. Then see if it works. If it does, we And hopefully that will work. I don't have a MS SQL server up right |
SQLGetData(statement, cast(ushort)(i+1), SQL_CHAR, buf.ptr, 255, &ptr);
--if(SQLGetData(statement, cast(ushort)(i+1), SQL_CHAR, buf.ptr, 255, &ptr) != SQL_SUCCESS)
--throw new DatabaseException("get data: " ~ getSQLError(SQL_HANDLE_STMT, statement));Yes it works this way. But just bought the first 83 rows of the table? |
db.query("INSERT INTO mytableVALUES('namevalue')");
if the namevalue comes from wstring.I get string by toMBS fuction, but it not work,and not get the sqlException.
Thank you.
The text was updated successfully, but these errors were encountered: