Hello!

I hope i posted the Thread correct!

Something weird is happening in my project. I save 50 pictures with some characteristics(Name, Size, Width, Height.....) in fields in database and all is working fine. Then when i delete one or two or three pictures still everything is fine. The problem comes when after deleting these pictures i save others into the database. When i save them i see in the datagrid that they are saved in the end(everyone in a new record). When i'm leaving this form and go to another that also has a datagrid the order of the picture has changed.
I will try to show it to you!

Pictures in database according to id:

Step1

1->Deleting
2
3
4
5
6
7
8
9
10

After deleting.

2
3
4
5
6
7
8
9
10

After inserting 4 new pictures.

2
3
4
5
6
7
8
9
10
11
12
13
14

Then going to another form. I get this in the datagrid:

2
3
4
5
6
11
12
7
8
9
10
13
14

Whu is that happening? Any ideas? the order of the pictures is ok in the database but in the DataGrid in all forms i get a wrong order!

When i go to another form i use this code:

Code:
MainForm.Show
Form2.Hide

Unload Form2-> Maybe this is wrong?
Thank's!