generate id read from database
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
[EDIT: 20110612 11:27 CDT - merge from duplicate - WDR]
Hi. I want to generate id in gui. This id will be saved in the mysql database. I use this coding, but the code only can display the last id in database, but not generated a new id..
processid = ('select process_id from process WHERE process_id = @@IDENTITY');
curs = exec(conn, processid);
curs = fetch(curs);
last_process_id = curs.Data{end};
set(handles.edit11,'string',last_process_id);
when I run the gui, the textbox display the last id in the process table, which is P001, it supposed to display P002.
[Material from duplicate question]
Hi. I want to generate id in gui. This id will be saved in the mysql database. I use this coding, but the code only can display the last id in database, but not generated a new id..
processid = ('select process_id from process WHERE process_id = @@IDENTITY');
curs = exec(conn, processid);
curs = fetch(curs);
last_process_id = curs.Data{end};
set(handles.edit11,'string',last_process_id);
when I run the gui, the textbox display the last id in the process table, which is P001, it supposed to display P002.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Reporting and Database Access en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!