HKFuey
asked on
Access error after changing primary key data type
I changed an autonumber (int) to bigint
I now get an error on this line: -
Set Rst = Dbs.OpenRecordset(Sql, dbOpenDynaset, dbSeeChanges)
"Data type missmatch"
Does anyone know how to solve?
I now get an error on this line: -
Set Rst = Dbs.OpenRecordset(Sql, dbOpenDynaset, dbSeeChanges)
"Data type missmatch"
Does anyone know how to solve?
ASKER
Hi Tom,
The code was working until I removed the autonumber and changed int to bigint on the Key field.
I had a look at the table in access and just get lots of #Deleted, I tried changing from bigint to int then relinked the table and still got lots of #Deleted
The code was working until I removed the autonumber and changed int to bigint on the Key field.
I had a look at the table in access and just get lots of #Deleted, I tried changing from bigint to int then relinked the table and still got lots of #Deleted
ASKER
OK I'm sorted.
I restored the database, removed the Autonumber without changing the datatype and it is now OK.
I restored the database, removed the Autonumber without changing the datatype and it is now OK.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Change back to int sorted it
It could also be the actual SQL query with joins that is causing the issue. I would recommend taking a look at the query that is being used by the SQL variable.
Tom