Re: Access error when linked to incrementing integer

Tech-Archive recommends: Fix windows errors by optimizing your registry



I can't follow your scenario, having never seen anything resembling
your description. Does the identity column in SQL Server have a unique
index or primary key defined on it? Access won't allow updates
otherwise.

--Mary

On Wed, 25 May 2005 07:46:01 -0700, "Monte"
<Monte@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>I have found a problem when linking a SQL Server 2000 table that contains an
>auto incrementing integer into Access 2002 via ODBC. Access identifies this
>field correctly as an "autonumber" field. However, when I add a record to the
>table, I get an ODBC error that mentions a "Cast" error. In other words, the
>ODBC driver is translating the field from SQL server (via Cast type
>function?) but Access thinks that the number can exceed the limit of an
>autonumber and we get the error. The only work around I have found so far is
>to link access to a table with the same name and ODBC connection, but where
>the SQL Server field is just an integer. Access then translates the field as
>a long integer. Then I replace the SQL table with the one that has the
>incrementing integer field, but don't refresh the link to Access. Records can
>now be added and edited in Access without a problem. Anyone seen this bug?

.



Relevant Pages

  • Access error when linked to incrementing integer
    ... I get an ODBC error that mentions a "Cast" error. ... ODBC driver is translating the field from SQL server (via Cast type ... to link access to a table with the same name and ODBC connection, ... incrementing integer field, but don't refresh the link to Access. ...
    (microsoft.public.sqlserver.msde)
  • Re: Access ODBC "Cast" Error
    ... answered in msde. ... I get an ODBC error that mentions a "Cast" error. ... >ODBC driver is translating the field from SQL server (via Cast type ... >incrementing integer field, but don't refresh the link to Access. ...
    (microsoft.public.sqlserver.odbc)
  • SQL Server ODBC Driver Ignores Authentication Setting
    ... set their ODBC connections with SQL Server Authentication, ... Microsoft Data Access Components 2.6 RTM, ... authentication to log into the database. ...
    (microsoft.public.sqlserver.security)
  • Re: Linking tables access - sql server 2005
    ... Another advantage of this method is that you don't need an ODBC setting on the local computer, ... Create a linked table to SQL Server without using a DSN ... Name of the table that you are linking to on the SQL Server database ... Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As ...
    (microsoft.public.access.adp.sqlserver)
  • Access ODBC "Cast" Error
    ... I get an ODBC error that mentions a "Cast" error. ... ODBC driver is translating the field from SQL server (via Cast type ... to link access to a table with the same name and ODBC connection, ... incrementing integer field, but don't refresh the link to Access. ...
    (microsoft.public.sqlserver.odbc)