| |

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-26 01:30:02
| Show all posts
The parameter types are as follows: (I compared, they are all in line)
public Bbs_PostDetailsInfo (int post_id, string post_title, string post_content, int user_id,
            string user_name, string user_email, DateTime user_adddate, int user_online, string userbase_sex,
            DateTime userbase_birthday, string userbase_seat, string userbase_oicq, string userbase_msn,
            string userbase_pic, string userbase_ink, string popedom_name, int userstate_postcount, int userstate_backcount,
            int userstate_classiccount, int userstate_exp, int userstate_money, int userstate_integral,
            string userstate_title, DateTime post_sendtime, int post_smallid, int posttype_id, string posttype_name, int post_browsecount, int post_heartimg, int post_backmoney)
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-26 02:15:02
| Show all posts
fainted.....
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-26 03:00:01
| Show all posts
Hell, you can only use stupid methods.
The value of each field declares variables.

Such as int i1 = dr.GetInt32 (0);

string s1 = dr.GetString (1);

............

See what went wrong ..
Reply

Use magic Report

1

Threads

16

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

 Author| Post time: 2020-4-26 17:00:01
| Show all posts
Let me try
Reply

Use magic Report

1

Threads

16

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

 Author| Post time: 2020-4-27 08:00:01
| Show all posts
Ha ha!
solved

I use
string h1 = dr.getname (0) .tostring ();

Get the column name of the first column, how is post_title?

When I create the entity class Bbs_PostDetailsInfo, the first field is clearly Bbs_Postif

sdr.Read (); How does the resulting column differ from the field order constructed by the entity class Bbs_PostDetailsInfo ?????
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-27 13:00:01
| Show all posts
Finally solved haha
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-27 13:15:01
| Show all posts
How does the resulting column differ from the field order constructed by the entity class Bbs_PostDetailsInfo ?????
=============>
Are the entities generated with tools?
Did you change the view later?
Reply

Use magic Report

1

Threads

16

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

 Author| Post time: 2020-4-27 15:15:01
| Show all posts
Entity classes are written

Changed view

But just added a field

will affect???
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-27 16:00:02
| Show all posts
Entity classes are written
======
That should be the order of adding columns.
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