|
Como pegar o ID de uma tabela? |
Iniciado por Marcos Roberto, 02,mar. 2015 02:07 - 3 respuestas |
| |
| | | |
|
| |
Miembro registrado 11 mensajes |
|
Publicado el 02,marzo 2015 - 02:07 |
Caros, tenho uma table sobre uma query (filtrada), ocorre q preciso pegar o no. do ID para localiza-la e abrir em uma window de alteracao. Fiz assim:
n is int vNoSerie is string vNoIMEI is string vDataReset is Date vMarca is string
n = TableSelect(Table_Qry_ControleMobile)
HReadSeekFirst(Mobile,MobileID,n,hKeepFilter) IF HFound(Mobile) = True THEN vNoSerie = Qry_ControleMobile.nseriemobile vNoIMEI = Qry_ControleMobile.NoIMEI vDataReset = Qry_ControleMobile.reset vMarca = Qry_ControleMobile.Marca END
Entaum na tabela eu tenho 3 registros filtrados. Quero pegar o ID do registro selecionado para pesquisa-lo.
Marcos Roberto |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 535 mensajes |
|
Publicado el 02,marzo 2015 - 08:53 |
Normalmente eu faço o seguinte, na Tabela eu coloco o id, e se nao quizer que apareca para o usuario o deixo escondido.. e ai faco o seguinte
IF TableSelect(TABLE_cliente)=-1 THEN RETURN
HReadSeekFirst(cliente,cliente.id_cliente,TABLE_cliente.COL_Id_cliente) IF HFound(cliente) THEN Open(WIN_Form_cliente) END
TableDisplay(TABLE_cliente,taCurrentSelection) mostra_cli_cliente(gnCodigo_representante,gnSituacao)

|
| |
| |
| | | |
|
| | |
| |
Miembro registrado 11 mensajes |
|
Publicado el 02,marzo 2015 - 14:09 |
Obrigado Amarildo, deu certinho.
Marcos Roberto. |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 535 mensajes |
|
Publicado el 02,marzo 2015 - 18:08 |
MarcosRoberto escreveu:
Obrigado Amarildo, deu certinho.
Marcos Roberto. Valeu |
| |
| |
| | | |
|
| | | | |
| | |
|