| |

VerySource

 Forgot password?
 Register
Search
Author: sunnyppp

The specified conversion is invalid !! Online etc ...

[Copy link]

1

Threads

16

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

 Author| Post time: 2020-4-23 22:30:01
| Show all posts
depressed!
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-24 12:45:01
| Show all posts
Wouldn't it be all written?
Reply

Use magic Report

1

Threads

16

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

 Author| Post time: 2020-4-24 15:45:02
| Show all posts
Not good

Errors are the same

Where is the problem

Dude help me take a closer look!
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-24 20:00:02
| Show all posts
Is this line wrong?

This error is an error when converting DBNull to a type. I just don't know where it is, so look carefully. I don't have a real environment.
Reply

Use magic Report

1

Threads

16

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

 Author| Post time: 2020-4-24 23:45:01
| Show all posts
Pass the breakpoint test
strSql = "SELECT * FROM V_Bbs_PostDetails WHERE Post_Id =" + postid;
sdr = GetDataReader (strSql);
Smooth execution
I passed the ms sql query analyzer to execute strSql = "SELECT * FROM V_Bbs_PostDetails WHERE Post_Id =" + postid; sql statement, no problem!
sdr = GetDataReader (strSql); also executed!
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-25 13:00:02
| Show all posts
You see which field values ​​are null in the results of the query analyzer, and then check these fields.
Reply

Use magic Report

0

Threads

13

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-4-25 14:30:02
| Show all posts
It must be caused by DBNULL. Find whether the related field converted to int is null
Reply

Use magic Report

1

Threads

16

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 Invalid IP Address

 Author| Post time: 2020-4-25 15:00:01
| Show all posts
No fields are empty!
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-25 16:00:01
| Show all posts
Not empty?

That can only check the parameter type of new Bbs_PostDetailsInfo.
Reply

Use magic Report

1

Threads

16

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 Ukraine

 Author| Post time: 2020-4-25 23:30:01
| Show all posts
I put
strSql = "SELECT * FROM V_Bbs_PostDetails WHERE Post_Id =" + postid;
Change to
strSql = "SELECT * FROM V_Bbs_PostDetails WHERE Post_Id = 391"
Both I determine in the sql query that there is a row of data
still the same
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