Since the above date I have had issues with a very stable application for months. Now I get sql errors trying to update files - I’m close to dumping this whole scriptcase development tool.
So unstable.
Since the above date I have had issues with a very stable application for months. Now I get sql errors trying to update files - I’m close to dumping this whole scriptcase development tool.
So unstable.
I feel part of your pain as everything we do with Scriptcase is based on MS SQL server. We have had issues but a lot of them disappeared when we patched the SQL Server AND we updated the OLEDB / ODBC connections. Lastly, we had to engage a php person to sift through the php.ini and make adjustments. Scriptcase needs to publish a 'best practice" guide to the php.ini. We’ve had several issues that related back to a commented out row or a value that was set too low.
SQL Server is the only database not standard present in the php.ini, but requires patching to get it running. I think that must have a reason. The PDO drivers are very sensitive in the sense that on each new PHP release, you require new drivers. Microsoft released the PDO driver for PHP 8.2 only weeks ago, while PHP 8.2 is here for months. I really like SQLServer, but it is very focussed upon .Net environments. With PHP I have a love/hate relationship because of all the changes in each new version. The latest version of SQL server changed a lot causing failing connections again, and I really don’t like to spend much time on every change they make. This has nothing to do with SC or other similar tooling, this has to do with Microsoft. In .Net everything works fine. But as I can’t always avoid using SQLServer, I also can’t always avoid using linux servers… And I’m a fan of Apache/Nginx, not really IIS…
Sorry if I mislead but my backend is mysql. I have embed code that I had to take out that checks a date field for >0 then does the instruction. This has worked for 2 years but it was as if it was ignoring the if and running the code every time causing a sql update error on the macro. code is below:
If ({CDate} > 0) {
{TotDays} = sc_date_dif({Due}, “aaaa-mm-dd”, {CDate}, “aaaa-mm-dd”);
{PctCom} = 100;
}
If ({CDate} > 0) {Status} = 5.0;
This is running in a hosted scriptcase environment
[Sorry if I mislead but my backend is mysql. I have embed code that I had to take out that checks a date field for >0 then does the instruction. This has worked for 2 years but it was as if it was ignoring the if and running the code every time causing a sql update error on the macro. code is below:
If ({CDate} > 0) {
{TotDays} = sc_date_dif({Due}, “aaaa-mm-dd”, {CDate}, “aaaa-mm-dd”);
{PctCom} = 100;
}
If ({CDate} > 0) {Status} = 5.0;
This is running in a hosted scriptcase environment
My wild guess would be a php 8.x issue. Was this project built in 7.4 and migrated to 8.1? Point is that PHP 8.x is way more strict regarding fieldtype and nulls…
No this is a 7.4 project running on 7.4. The if statements in php run in a before update embed and stopped working on March 7. Code is below.
Do you have another way to check a date for not null I can use ? Date in question is null.
If ({CDate} > 0) {
{TotDays} = sc_date_dif({Due}, “aaaa-mm-dd”, {CDate}, “aaaa-mm-dd”);
{PctCom} = 100;
}
If ({CDate} > 0) {Status} = 5.0;
The if statements are totally ignored and the following code is executed when it shouldn’t. I want it to run when a valid date is present.
I’ve done all sorts of workarounds with dates. Assuming some minimum date,
$date1 = “1900-01-01”;
if ({cdate}>$date1) { code
or just
if ({Cdate} is not null) {
Thanks I tried it but it didn’t work so I ended up with this and it works
if({CDate} != “null”){
{TotDays} = sc_date_dif({Due}, “aaaa-mm-dd”, {CDate}, “aaaa-mm-dd”);
{Status} = 5.0;
{PctCom} = 100;
}