# Whether IDENT\_CURRENT command valid in MS sql server 7?

**URL:** <https://forum.kirupa.com/t/whether-ident-current-command-valid-in-ms-sql-server-7/35020>\
**Category:** Uncategorized\
**Created:** [November 9, 2003, 1:48pm UTC](https://forum.kirupa.com/t/whether-ident-current-command-valid-in-ms-sql-server-7/35020 "2003-11-09T13:48:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBUH](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@SBUH](https://forum.kirupa.com/u/SBUH)\
**Post date:** [November 9, 2003, 1:48pm UTC](https://forum.kirupa.com/t/whether-ident-current-command-valid-in-ms-sql-server-7/35020/1 "2003-11-09T13:48:40Z")

</div>

Hello, I have problem with this command in Ms sql sever 7. It was working under MS sql server 2000 but now doesn’t work in 7.

```php

set rs=Server.CreateObject("ADODB.Recordset")

rs.open "select IDENT_CURRENT("mytable") AS ID","Dsn=project;uid=;pwd=;"

```

It gives error message saying:  
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)  
[Microsoft][ODBC SQL Server Driver][SQL Server]‘IDENT\_CURRENT’ is not a recognized function name.

And I want to make it so that it can always get the latest ID in m table. So could any one give some suggestion how to make it in other ways or I can still use the command of “IDENT\_CURRENT” but change my code?

Thanks very much in advance!
