Login form
i am making a login windows form for my application. user has to first logon to go to the MDI form and then further proceed to other forms. in my database table i have assign a tableId column and i want to increase the id on any addition to the database table. but i want to increase the table id as "0000" that means in four digits. when it will increase it will show 0001 in the table. please help.
siva sakthiPosted Aug 21, 2009, 5:21 AM
Its not possible to your need with int column.
yeah its possible with varchar type.
while you query to the front end, just pad the zeros infront of the actual id and get the result.
SELECT RIGHT ('0000'+ CAST (eno AS varchar), 4) from tablename
you can easily do your need with this..
if u ve any query let me know...
Roei BarPosted Aug 21, 2009, 3:14 AM