1。you can not get the identity number before you finish the 'Update' or 'Insert'.
in your code, you was using like this way:
rs(1)="123"
rs(2)="abc"
rs(3)="picture_" & rs(0) (but the rs(3) get nothing, why i can not get rs(0) value )
Of cause you can NOT get rs(0), it has not been inserted yet!
2. in this case, you should use another column(field) to store your rs(0) (i.e, uni_num) as soon as it is intered, (you can put this in a trigger), then do a 'Update' to get the value of uni_num, combine it with your rs(3) and save it into DB.
so your code should like this:
rs(0) (auto number)
...
rs(3) = ' ' (it's blank in this Insert)
rs(4) (new field, same as rs(0))
.update
then get this record again.
rs(1)="123"
rs(2)="abc"
rs(3)="picture_" & rs(4)
.update
3. of cause you can put all of them into a Insert trigger, so when you do the insert, you can generate the rs(3) immdieatly.
in your code, you was using like this way:
rs(1)="123"
rs(2)="abc"
rs(3)="picture_" & rs(0) (but the rs(3) get nothing, why i can not get rs(0) value )
Of cause you can NOT get rs(0), it has not been inserted yet!
2. in this case, you should use another column(field) to store your rs(0) (i.e, uni_num) as soon as it is intered, (you can put this in a trigger), then do a 'Update' to get the value of uni_num, combine it with your rs(3) and save it into DB.
so your code should like this:
rs(0) (auto number)
...
rs(3) = ' ' (it's blank in this Insert)
rs(4) (new field, same as rs(0))
.update
then get this record again.
rs(1)="123"
rs(2)="abc"
rs(3)="picture_" & rs(4)
.update
3. of cause you can put all of them into a Insert trigger, so when you do the insert, you can generate the rs(3) immdieatly.