I currently have a website which is using ASP.NET 2.0, C#, and SQL
Server 2005. The website will be used to enter grants for a
university. When a new grant is entered, I need to generate a primary
key. The primary key will need to follow the format: Two digit for
fiscal year, then number of the grant for that year. Example:
Year 08 and 14th grant of the year would be: 0814
How can I implement this. Right now, I have a "New Grant.aspx" page
with a Submit button. I am guessing the date is going to be formatted
in C#. How can I check what the last primary key in the database is?
Also, it seems to me that SQL Server insists that the primary key be
32 bits long, however my primary key will only be 4. How can I
override this? Thanks.
Server 2005. The website will be used to enter grants for a
university. When a new grant is entered, I need to generate a primary
key. The primary key will need to follow the format: Two digit for
fiscal year, then number of the grant for that year. Example:
Year 08 and 14th grant of the year would be: 0814
How can I implement this. Right now, I have a "New Grant.aspx" page
with a Submit button. I am guessing the date is going to be formatted
in C#. How can I check what the last primary key in the database is?
Also, it seems to me that SQL Server insists that the primary key be
32 bits long, however my primary key will only be 4. How can I
override this? Thanks.
Comment