| |

VerySource

 Forgot password?
 Register
Search
View: 891|Reply: 4

Ask again adoquery insert Chinese save incomplete data

[Copy link]

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-6 15:30:02
| Show all posts |Read mode
After I use adoquery to insert updated data, how do I always display only the first few in Chinese? A few are not displayed, and the English will not save errors. My database is sql server. What do you heroes have? A good solution is better.
Reply

Use magic Report

0

Threads

40

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-5-23 10:45:01
| Show all posts
It is a bug of DELPHI. Don't use ": variable" in SQL, construct SQL directly with string accumulation

Or use the data set to write the database.

I think you should write the database directly with SQL
Reply

Use magic Report

0

Threads

13

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-5-23 21:45:01
| Show all posts
First of all, you have to make sure that the character set installed when SQL SERVER is installed is correct. Otherwise, SQL SERVER can only be reinstalled.
For this problem, I have concluded that DELPHI and SQL SERVER use different encoding methods. SQL SERVER uses UNICODE encoding, while DELPHI uses ANSI
the way. So when the Chinese character data is updated, it will make the Chinese character update incomplete. My method is to set the length to 100.
You can solve this problem.
Reply

Use magic Report

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-5-27 15:15:01
| Show all posts
I use parameters for zl1, is this not enough? Construct SQL directly with string accumulation, please give an example

I installed the SQL server directly for zl2. Is the installed data set correct? What should I pay attention to during installation, or should I increase the installation? You said that you added those codes to the BeforeExecute event of the stored procedure of the DATA MODULE of the application server ,
Can you make it clear, which control key is the BeforeExecute event on?
Reply

Use magic Report

0

Threads

40

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-6-3 11:00:01
| Show all posts
For example: adoquery.sql.text:='update table1 set field1=``'+Str1+''' where fieldkey=1';
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