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?
HKFueyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ButlerTechnologyCommented:
Are you passing any variables that work with the SQL variable?  It sounds like you have a variable declaration that is INT and you are now attempting to assign a BIGINT.

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
0
HKFueyAuthor Commented:
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
0
HKFueyAuthor Commented:
OK I'm sorted.

I restored the database, removed the Autonumber without changing the datatype and it is now OK.
0
ButlerTechnologyCommented:
I believe that BigInt is treated as character data when it is link to MS Access.
Tom
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HKFueyAuthor Commented:
Change back to int sorted it
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.