| |

VerySource

 Forgot password?
 Register
Search
View: 943|Reply: 6

Can you please help me to see how the same program fails on some machines

[Copy link]

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-14 17:20:01
| Show all posts |Read mode
OperatorDate between '"+ DateTimePicker1-> Date +"' and '"+ (DateTimePicker2-> Date + 1) +"' "

This is part of the SQL statement. How can it be used on some machines and some can be used. There is no error in the compilation environment. What is the problem?
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-1-18 12:18:02
| Show all posts
The error is Error converting from string to datetime
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-1-25 23:36:01
| Show all posts
No one is there
Reply

Use magic Report

0

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-28 17:54:01
| Show all posts
Is there a format error?
Use FormatDateTime to convert it. . .
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-2-7 22:45:01
| Show all posts
It should be, but some machines can, some can't.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Hong Kong

Post time: 2020-2-16 12:00:02
| Show all posts
SQL syntax error? It depends on what database
Incorrect query results? DateTimePicker1-> Date This one is not a date. Use FormatDateTime to convert it.
Reply

Use magic Report

0

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 Liberia

Post time: 2020-6-2 09:15:01
| Show all posts
Similar problems have occurred before, generally the system date and time format. Try the following method

In SQL, look at the format of the OperatorDate field record. Use FormatDateTime() in BCB to format it into the date and time format in SQL.

There is your DateTimePicker1->Date is best to make AnsiString first
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