SQL - why does this not work?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ZeitenWanderer
Pro Scripter
Posts: 68
Joined: Wed Dec 07, 2005 7:13 am

SQL - why does this not work?

Post by ZeitenWanderer » Sun May 29, 2016 4:17 pm

Wanted to change the value in an MSAccess-field, but despite that no error message shows up, this minimum task does not do the job. Any idea anybody?

Code: Select all

Let>constr=provider=Microsoft.Jet.OLEDB.4.0;Data Source=DARP_DB.mdb
DBConnect>constr,dbH

UPDATE tblbuchdaten SET DataSelected = REPLACE(DataSelected,"0","1");

DBClose>dbH

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: SQL - why does this not work?

Post by Marcus Tettmar » Mon May 30, 2016 3:33 pm

You need something like:

Let>QRY=UPDATE tblbuchdaten SET DataSelected = REPLACE(DataSelected,"0","1")
DBExec>dbH,QRY,qResult
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts