MySQL ADO.Recordset.Update QQ

manthonylugomanthonylugo Posts: 36Member
edited 2018-03-15 in NAV Three Tier
Hi Experts,

Am having this error whenever I run my code.

Here's my code:

j1yp39gof6cg.png

Here's the error after it runs:

aorsbkzjt2cw.png

Although in my script or query I only use 1 table.

I did try using an updated version of MySQL Driver but I'm having difficulty connecting it in the server so I stick with the older one.

I don't know what to do, am going crazy for days now.

Hope you could help me out guys.

Thanks,
Marc

Best Answer

  • manthonylugomanthonylugo Posts: 36
    Accepted Answer
    Hi,

    Just to give an update on my concern, instead of using the Update function in ADO.Recordset, I create a storedprocedure to handle my updates instead and simply calling that storedproc on every iteration. well it gives the same performance so am okay with it.

    Thanks for all the replies experts!

Answers

  • YuryYury Posts: 59Member
    edited 2018-03-15
    Hi, Marc
    Could you show details of "Query004"?
    Regards,
    Yury
  • manthonylugomanthonylugo Posts: 36Member
    Hi Yuri,

    this is the value of txt constant.
    SELECT in_id,in_Sender,in_receiver,DATE_FORMAT(in_datetime,'%m/%d/%y'),DATE_FORMAT(CONVERT_TZ(in_datetime,'+00:00','+08:00'),'%r'),in_msg,flg_csv FROM playsms_tblSMSInbox WHERE flg_csv = 0;
  • manthonylugomanthonylugo Posts: 36Member
    Anyone?
  • Slawek_GuzekSlawek_Guzek Posts: 1,554Member
    Maybe the playsms_tblSMSInbox is a view, not a table. Still the error does not make much sense as you are clearly reading the data.

    What the Option=3 in your connection string does?
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • manthonylugomanthonylugo Posts: 36Member
    Hi Slawek,

    No sir it's a table. I can read all the record in it but when I add the update command it gives that error..
    What the Option=3 in your connection string does?

    What option=3 sir?
  • Slawek_GuzekSlawek_Guzek Posts: 1,554Member
    The part of your connection string:
    8qqj0yv3dw42.png
    Why did you put it in your connection string and what it is supposed to do?
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • manthonylugomanthonylugo Posts: 36Member
    Ohh, I just found that on connectionstrings.com

    Here:
    tfrpwlozr233.png
  • manthonylugomanthonylugo Posts: 36Member
    But I don't think it has a connection for the Recordset.Update functionality.
  • Slawek_GuzekSlawek_Guzek Posts: 1,554Member
    Option=3 is supposed to set some behaviour of the ODBC driver. What if it is some sort of logging, which implies inserting or updating data? I don't know, just guessing. Having googled around shortly I didn't find anything about this parameter, so I wonder if you know what it is supposed to do.

    connectionstrings.com includes samples, but no explanation.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • manthonylugomanthonylugo Posts: 36Member
    Accepted Answer
    Hi,

    Just to give an update on my concern, instead of using the Update function in ADO.Recordset, I create a storedprocedure to handle my updates instead and simply calling that storedproc on every iteration. well it gives the same performance so am okay with it.

    Thanks for all the replies experts!
Sign In or Register to comment.