Het gaat om 2 forms. Op beide forms staat bijna hetzelfde:
Op form1 staan de volgende componenten :
table
datasource
dbgrid
dbtext
button
Op form2 staan de volgende componenten.
table
datasource
dbgrid
dbedit
Als er op de button word geklikt opent form2 en kun je de gegevens veranderen. Het probleem is dat hij de steeds het eerste record uit de table pakt. Ik wil het dus voor elkaar krijgen dat ik in form1 een record kan selecteren (vanuit de grid) en dan op de button kan klikken zodat hetzelfde record word geopend in form2.
Dit:
werkt niet
In de help staat :
To get record information from the table, you need to determine the size of the record buffer. You can obtain this information from the cursor by using the function DbiGetCursorProps. The Cursor properties include information on the table name, size, type, number of fields, and record buffer size. You can find more information on cursor properties in CURProps.
CURPropscurProps;// Properties of the cursor
Chk(DbiGetCursorProps(
hCur, // Handle to the cursor
&curProps));// Properties of the cursor (table)
curProps.iRecBufSize contains the size of the record buffer.
Ik kom er niet uit.
Op form1 staan de volgende componenten :
table
datasource
dbgrid
dbtext
button
Op form2 staan de volgende componenten.
table
datasource
dbgrid
dbedit
Als er op de button word geklikt opent form2 en kun je de gegevens veranderen. Het probleem is dat hij de steeds het eerste record uit de table pakt. Ik wil het dus voor elkaar krijgen dat ik in form1 een record kan selecteren (vanuit de grid) en dan op de button kan klikken zodat hetzelfde record word geopend in form2.
Dit:
code:
1
| form2.table:=form1.table; |
werkt niet
In de help staat :
To get record information from the table, you need to determine the size of the record buffer. You can obtain this information from the cursor by using the function DbiGetCursorProps. The Cursor properties include information on the table name, size, type, number of fields, and record buffer size. You can find more information on cursor properties in CURProps.
CURPropscurProps;// Properties of the cursor
Chk(DbiGetCursorProps(
hCur, // Handle to the cursor
&curProps));// Properties of the cursor (table)
curProps.iRecBufSize contains the size of the record buffer.
Ik kom er niet uit.