| |

VerySource

 Forgot password?
 Register
Search
Author: kolerk

Brothers who have research on the garbled problem come in

[Copy link]

0

Threads

34

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-2-21 05:30:02
| Show all posts
Is the @username procedure parameter in a stored procedure of type varchar or nvarchar? If it's not n, try it again.
Reply

Use magic Report

0

Threads

48

Posts

30.00

Credits

Newbie

Rank: 1

Credits
30.00

 China

Post time: 2020-2-21 12:15:02
| Show all posts
"exec procedure name, @username procedure parameter = N '??????" "?
Reply

Use magic Report

0

Threads

48

Posts

30.00

Credits

Newbie

Rank: 1

Credits
30.00

 China

Post time: 2020-2-21 14:30:01
| Show all posts
Specify encoding on the page
Reply

Use magic Report

0

Threads

23

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-2-22 17:45:01
| Show all posts
Using hashtable to pass parameters to stored procedures
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-3-3 13:45:01
| Show all posts
to:德鲁伊
Procedure parameter is nvarchar

In addition, such an interesting phenomenon was found during the monitoring of sql server profiler:
Asp.net's built-in controls query the database, when the stored procedure is executed, the database will automatically add N to the parameter whose parameter type is nvarchar during execution, so the above problems will not be encountered.
This means that when the stored procedure I wrote is executed, the database will remove the N that should be added, so it will cause garbled characters.

Jingxiong reminded that the final solution is to compose a sql statement in the website program, add N to the statement, and then execute it.

However, the problem is still to be studied.
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-3-3 20:00:02
| Show all posts
Procedure parameter is nvarchar

In addition, such an interesting phenomenon was found during the monitoring of sql server profiler:
Asp.net's built-in controls query the database, when the stored procedure is executed, the database will automatically add N to the parameter whose parameter type is nvarchar during execution, so the above problems will not be encountered.
This means that when the stored procedure I wrote is executed, the database will remove the N that should be added, so it will cause garbled characters.

Theshenmue024brother reminded that the final solution was to compose a SQL statement in the website program, add N to the statement, and then execute it.

However, the problem is still to be studied.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list