in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Is it possible to create a user defined function like MSSQL's scope_identity

Last post 03-01-2010 12:58 PM by senglory. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-20-2009 1:00 PM

    Is it possible to create a user defined function like MSSQL's scope_identity

    I'm busy with a program which is build in C# with LINQ and it works fine as long as I select data but when I'm trying to store data in it I get a SELECT error. Now I've found out this is because of a select query who looks like this SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]. My question is: is it possible to create a user defined function with the same functionality as MSSQL's scope_identety. Or is there a other way to work around it? Regards DJohn001
  • 03-20-2009 2:08 PM In reply to

    Re: Is it possible to create a user defined function like MSSQL's scope_identity

    Without knowing anything else, all I can suggest is:

    SELECT last_insert_rowid() as value

    There's no need to cast or convert it.

     

     

     

  • 03-21-2009 7:20 AM In reply to

    Re: Is it possible to create a user defined function like MSSQL's scope_identity

    The problem is that the library developped by microsoft isn't open source and I have got no idea how to fix it. My idea was to make a user defined function with the same name and so solve the problem. I've got no idea else how to fix this then MS sqlce or is there a better way? Greets DJohn001
  • 03-01-2010 12:58 PM In reply to

    Re: Is it possible to create a user defined function like MSSQL's scope_identity

    Did you find the solution for your problem? I've just faced with exactly the same one.

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems