| |

VerySource

 Forgot password?
 Register
Search
View: 1020|Reply: 5

How to modify the records in the dataset

[Copy link]

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-9-25 13:00:01
| Show all posts |Read mode
I want to modify several columns in the dataset. For example, one column in the dataset is schoolID, but the datagrid bound to it requires the schoolName to be displayed. There is a school table in the library, and the schoolName can be obtained through schoolID.
Thank you all in advance!
Reply

Use magic Report

0

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-9-25 13:15:01
| Show all posts
It is best to write a view and query from the view.
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-9-25 13:30:01
| Show all posts
the first method:
Add a column to the DataSet, traverse, use the ID to retrieve the Name from the database, assign a value to the Name column of all rows, bind the Name column in the DataGrid, and hide the ID column.
The second method:
Make a view of the database, try two tables, and then retrieve the data (including Name) at a time, and then bind it as above.
Reply

Use magic Report

1

Threads

60

Posts

37.00

Credits

Newbie

Rank: 1

Credits
37.00

 China

Post time: 2020-9-25 19:30:01
| Show all posts
You'd better combine the data in the database, and then display it in the DataGrid, and then hide the ID, that's it, the operations that can be done in the database are best done in the database
Reply

Use magic Report

1

Threads

18

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-9-26 09:15:01
| Show all posts
Agree to combine in the database before taking it out
Reply

Use magic Report

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-9-26 21:30:01
| Show all posts
Can views be used for two tables that are not in the same library? ? ? ?
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