#7 select @@IDENTITY -- Error (SQL Server)

closed
Bengt Gunne
None
5
2004-06-14
2004-06-09
Leif Pettersson
No

Running the query select @@IDENTITY against SQL-
server with the the OleDB provider result in the error:
No value given for one or more required parameters.
The same query with the Odbc provider result in the
error:
ERROR [07002] [Microsoft][ODBC SQL Server Driver]
COUNT field incorrect or syntax error.

Discussion

  • Bengt Gunne
    Bengt Gunne
    2004-06-09

    Logged In: YES
    user_id=895705

    The SQL Filter SqlFilterParameterMarkers replaces all
    occurrences with @identifier with ? when OleDb is the
    underlying provider. In your case that will translate to @? (as
    a standalone @ is not touched). This produces the syntax
    error in your query.

    Either the SQL Filter should raise an error when an SQL
    Server global value @@identifier is found or leave it alone (in
    the hope that it is SQL Server that is being used).

     
  • Bengt Gunne
    Bengt Gunne
    2004-06-14

    • assigned_to: nobody --> mimerbg
     
  • Bengt Gunne
    Bengt Gunne
    2004-06-14

    Logged In: YES
    user_id=895705

    A correction has committed to CVS. Please let me know if it
    works as expected. The filter should pass through
    @@identifier without modification.

     
  • Bengt Gunne
    Bengt Gunne
    2004-06-14

    • status: open --> closed