can i use DAO to connect to SQL server 2000?

I have an application that used Access 2000 as backend and frontend. We moved backend to SQL 2000 and of course we are getting errors "record not updateable. etc..."
It seems that the whole CBF is DAO. If I leave the DAO code:
Dim db As Database
Dim rs AS Recordset

Set db = CurrentDb
Set rs = db.OpenRecordset("table name", dbOpenDynaset)

It does not work, it is looking for the db locally, and the tables are linked to SQL. Is there a way to keep DAO or am I going to have rewrite the frontend?
Thank You ahead of time.
LVL 5
ircpamanagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

fcfangCommented:
I still have a bunch of legacy apps that use DAO to access that that has since moved to SQL2k.

I just have to make sure that the tables from the SQL2k server are Linked into the current db. Once this is done, you can rename the tables to match what they once were and it should work without a problem.

"Record not updateable" problems are sometimes also caused when there is no primary key on the SQL2k table and none chosen to be a pk when linking into the AccessDB.

Hope this helps.
Frank.
fcfangCommented:
You may also have to change your code depending on your query from

set rs = db.openrecordset("tbalename",dbopendynaset)

to

set rs = db.openrecordset("tbalename",dbopendynaset, dbseechanges)
ircpamanagerAuthor Commented:
I linked the tables. Then renamed them to what they were. But I still get the errors "This recordset is not updateable."
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

ircpamanagerAuthor Commented:
I also get "Cannot update. Database ot object is read-only"
raopsnCommented:
All the linked tables should have a PRIMARY KEY in the SQL Server, otherwise the recordset or not updatable

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
SidFishesCommented:
"This recordset is not updateable."

likely means you doen't have primary keys defined. SQL server needs them, access doesn't "require" them

"Cannot update. Database ot object is read-only"

Make sure you have you sql server permissions set so the table rows can be updated and inserted and deleted
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.