Saya coba bantu ya.....
coba gunakan coding dibawah ini:
Select ((max(cast(substring(d.[kode dokter],3,4) as smallint)))+1) as 'KODE
DOKTER'
from Dokter d
where substring(d.[kode dokter],1,2)='DK'
gunakan coding diatas untuk dibuat "Function"nya atau "Store Procedure" atau
"Trigger", sesuai dengan kebutuhan saudara. jadi di VB tinggal dipanggil
"Function" atau "Store Procedure"nya saja. tergantung saudara membuat
"Function" atau "Store Procedure".
Semoga membantu.
God Bless You
ahmad fikri <[EMAIL PROTECTED]> wrote: gimana
caranya membuat auto number pada filed kode_dokter....contoh: apabila di dalam
database field kode_dokter yg terakhir ialah "DK0001"...apabila kita klik
command "add" maka secara otomatis txt_kode_dokter = "DK0002"....link database
menggunakan "SQL server 2000".....tolong bantuannya????....newbie....maklum
---------------------------------
Never miss a thing. Make Yahoo your homepage.
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
[Non-text portions of this message have been removed]
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
[Non-text portions of this message have been removed]