Clarion 12 - What Problems or Issues have you found?

What is the address for problem tracker? http://problemtracker.softvelocity.com/ does not appear to work at the moment. Do they have a site more recent? Or should I report problems to Softvelocity via email?

http://problemtracker.softvelocity.com/ works for me

https:// does not

1 Like

If it is the driver, then you should be able to create a very simple little CLW file to show the problem, something like:

program
  map
end
yourfile declaration with ID field declared with identity, read only etc. same as in your porgram

code
   open(file)
   yourfile{PROP:Profile} = 'showswql.log'
   yourfile{PROP:details} = 1
   yourfile{prop:logsql} = 1
   you:someotherfield = 'Somevalue'
   add(yourfile)
   if error() then 
      message('could not insert')
   else
      message('Retrieved ID is ' & you:id)
   end

And running with the C12 dll should show the retrieved ID is null (0), and it should be good with the C11 ID.

I completely disagree with “The driver option /AUTOINC is related when Clarion is controlling autoincrement and not the SQL backend”. I’ll try to explain again…

You have a file that has an ID number you want the server to increment, and one other field.
You do:
fil:othervalue = ‘Very important’
add(file)

At that point your buffer looks like:
ID – nothing in it, clarion will probably treat it as 0
othervalue has ‘Very important’ in it.

What the driver will send to the backend is:

insert into file (othervalue) values(‘Very important’);

The server will insert the record with whatever Identity value it comes up with.

After the insert the buffer in Clarion still looks exactly the same – there is nothing in FIL:ID.

This is where autoinc comes into play. If you have declared /AUTOINC = ‘select scope_identity’ on your file, then after an insert, clarion will send that query to the server, and it will put the returned value into the field that it has been told is the identity field.

So after the combination of the insert and the select scope_identity, the FIL:ID column should have the identity value that the server created for the record it just inserted.

So the /AutoInc has everything to do with the SQL backend and nothing to do with Clarion auto increment.

Yes, I understand, Jon. Thank you for the example. I remember a couple of places where I had to retrieve the identity column value from a newly inserted record when inserting with embedded code. I will research /AUTOINC more today, which might help with those scenarios.

My previous example was all performed with the Clarion Update Template, which has worked flawlessly with hundreds of MSSQL insert procedures since 2015. So, something has changed. Maybe Clarion is placing new requirements on its SQL drivers. I do not know.

1 Like

I use Problem-Tracker Support System
But I would definitely email support, too. Especially, this early in the C12 release cycle.
Also, as Jon pointed out, if you can create a simple example to demonstrate the problem that will help them.

Do a comparison on the code between a C11 and C12 form where you think this is no longer working. It might only be apparent if you needed the parent value before inserting child records?

(I have a template that I use for getting the SQL autoinc value so if that was missing from the C12 version it would be evident in the code comparison)

Rick, Robert @ tech-support asked me to send an example of the problem. I sent a sample application and a sample database. He was able to duplicate the identity column problem and sent the issue to development.

3 Likes

Anyone having an issue w/ how controls display under v12 - I recompiled my program in v12 and all the controls are not right? Drop List are transparent and my font look has changed

Using : ‘Segoe UI’,10

Note: I am not using any Manifest (never have with any of my apps) – I did try w/ Manifest and no real change

This compiles in v11
p_web.AddServiceError(401,GlobalErrors.GetProcedureName(),'TechNo', 'TechNo < 2','Only TechNo 2 and 3 allowed for Ticket Appointments')

and
loc:prompt = Choose(1=0,'',p_web.Translate('< 0.5'))

but throws this error in v12
Invalid string (misused <…> or {…}, or literal is too long) -

I know it is the < symbol and should be << - but this did not happen in v11

You have those gippy looking quotation marks. Is that in your code?

No, just the way it pasted - it is the < in CW 11 works in CW 12 it wants <<

1 Like

I’m still on 11.0. (And playing with 12).

But as I recall, 11.1 changed the behavior and enforced more strict observance of <<

Technical debt…

1 Like

I never upgraded to 11.1. So maybe true.

Note the comment about 13788: " Compiler became pedantic about < { etc"

And comments here.

1 Like

11.1 requires << if the next (non space) character is a digit.

@Jim-Morgan reported July 7, 2025 in Discord that Clarion 12 using the new MSSQL driver no longer works for code like below:

!FYI in Browse that uses the CCS legacy templates with the MSSQL driver
OPEN(View)
View{Prop:SQL} = [expression] 
NEXT(View)

This code returns no records while it worked fine in Clarion 10.
Jim also tested using the 11.1 MSSQL.DLL with Clarion 12 and it worked as expected, so further confirms it is a change in the 12 MSSQL driver code.

To make the code work requires a SET():

OPEN(View)
View{Prop:SQL} = [expression] 
SET(View)      !<-- Add for Clarion 12
NEXT(View)

Bruce commented the SET() is best for maximum “correctness”:

Jim, in my opinion using prop:SQL as an implicit SET(view) likely worked by accident. Perhaps because the VIEW was set in a previous loop.
In my driver code a SET is necessary to “fix” properties (like prop:sql, prop:filter and so on) - the (first) NEXT then builds the actual SQL statement and it goes from there.

Its been quite a few months since I dived down this rabbit hole (in C11) - but from memory the order is
Open()
!Set properties
SET()
Loop
NEXT()

Again it’s been months since I did a deep dive on this behavior, but I’m reasonably sure my behavior matches the existing driver behavior.

That said, as long as the VIEW is not closed a previous SET is likely “still in force”. As long as the VIEW has been set once, you can likely change the properties and do a NEXT. Maybe. I wouldn’t recommend it though because you might see unexpected behavior as a result of other code. (For example injecting a CLOSE / OPEN - something the Legacy templates do a LOT - would lkely “unset” it.

In short - for maximum “correctness” I would recommend a SET(View). You’re more likely to get “the settings you expect” and less likely to get settings left over from previous loops.

4 Likes

Hi,

The Clarion’s 11.1 Help, in the “Optimizing using the WHERE driver string”, has code examples with the properties setting after the SET(), not before…

SET(MyFile)
MyFile{PROP:WHERE} = 'CUSTOMERID = ' & LOC:CUSTOMERID
LOOP
    NEXT(MYFILE)
    IF ERRORCODE() THEN BREAK.

    ! process record here
END

Jim’s post was about PROP:SQL not Where.

In the Help for SEND (file, '/WHERE [ where-clause ]' and PROP:Where it says it must come after the SET() and before NEXT() because the SET clears the Where:

The SQL Accelerator drivers automatically build SQL WHERE clauses when your Clarion code contains a SET followed by a NEXT or PREVIOUS. You can customize the driver generated WHERE clause by using the WHERE driver string. You can also set the WHERE driver string at runtime with the use of PROP:WHERE. PROP:WHERE is a write-only property.

The SEND /WHERE must be executed after the SET statement and before the NEXT or PREVIOUS statement.

Note:

The SET statement clears any WHERE clause set by the SEND statement.

1 Like

According to Bob Z, A SET command is not required to process of View. See Below.

The SET statement is not real problem as previously stated.
Issuing a SET(View) statement in a View with three joined tables gets a result, but not the correct result. The order by in the Prop:SQL is ignored (Order by Name).

I minimized the problem to it’s lowest level and attached a test program with a two and three table view. There also a script to create a tiny test db.

The two table view works in C12, the three table view does not work.
The two table view is commented out in the test program currently.

If you build the solution in C11.1 or earlier, it runs correctly. Build it in C12 and it fails.
Both the C12 and C11.1 version use ODBC Version 17.
The only difference is the CLAMSS.DLL. V11.1.0.13810 or 12.0.0.13491

Failing to Issue a SET statement in the three table View gets no results in C12, but gets the correct result in C11.1.
TestC12SQL.zip (4.0 KB)

I got a reply from BobZ
Sent: Friday, July 11, 2025 5:05 PM
Subject: Re: Change in behavior in C12 SQL Driver

"There wasn’t any change aimed at requiring a Set command, so to determine what is causing the change in behavior, we need to know in your application: what version of the Microsoft ODBC driver is being loaded/executed in C12, vs what version of the Microsoft ODBC driver was being used in the Clarion 11.1 version of your app. This will help us in the analysis, as well as trying to debug why this has changed.*
But to repeat, we did not make a change that said, “Let’s require a set command.” so it’s a murky area. Let’s work it out, I’m sure it will be interesting because we didn’t add any code change that enforced you must issue a set command.

From a first glance, it would seem that there should in fact be a set command issued as the help specifies, but we’re all for supporting existing behaviors where we can.*

So let’s dig into it and find an answer, the first step is to identify which MS ODBC drivers are being used in the 2 versions of the Clarion app"*

1 Like

Attached is a sample application which shows different behavior in CW12 than CW11
in CW12 the list control bleeds through the window color, in CW11 it does not

I have made the window Yellow for effect, I use another “grey variation” in my apps

Issues.zip (14.1 KB)