| |

VerySource

 Forgot password?
 Register
Search
View: 740|Reply: 3

How to assign the contents of the rs dataset to the jTextField

[Copy link]

2

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-23 13:40:01
| Show all posts |Read mode
How to put the contents of the rs dataset into the jTextField? I am a beginner. I want to ask this little question, which big brother can tell me?
Reply

Use magic Report

1

Threads

51

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-2-6 20:00:02
| Show all posts
jTextField.setText (rs.getString (int columnIndex));
Reply

Use magic Report

0

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-6 21:00:02
| Show all posts
If there are multiple values, you can get a String first, and then setText ()
Reply

Use magic Report

0

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-2-7 15:00:02
| Show all posts
jTextField.setText (rs.getString ("field name"));
jTextField.setText (rs.getInt ("field name"));
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