ajrpc
ajrpc

Reputation: 43

asp.net membership - ident_current('aspnet_Users') retrieves NULL

I have asp.net Membership configured, and when i do a "Select ident_current('aspnet_Users')" it retrieves NULL, and i have information there. If i do the same command to another table it returns right.

I'm doing that in Microsoft SQL Management Studio with 'SA' default login.

Upvotes: 0

Views: 168

Answers (1)

Kevin Main
Kevin Main

Reputation: 2344

You won't be able to do this on the aspnet_users table as it uses a Guid as its primary key - I guess the other table you tried had a standard int identity which is why it worked.

What exactly are you trying to do? If you want to get the generated Guid back from a query then use OUTPUT (see https://stackoverflow.com/a/1510529/1191903)

Upvotes: 2

Related Questions