Unhandled exception in Schema Modeler

Having a show-stopping problem here.

I’m trying to modify a large script I have stored within a command inside a TDASchema. This script is over 5000 lines long. Note that it’s not actually a command, I just use this as a storage area for the script which I then use elsewhere.

Any attempt to modify this script is resulting in a window popping up saying “unhandled exception” but with no text in the window. The schema modeler then closes.

This has only started happening since I upgraded to the latest components and is now stopping me working as I need to modify this script.

Any suggestions?

Hello

Could you send that .daSchema file to support@ ?

Done.

I’ve stripped everything else out of it apart from a single command containing the large script. Just edit this script in any way at all and then attempt to save the changes (just moving focus does it) and it’ll crash every time for me without fail.

I’m on 9.3.105.1351 with Delphi 10.2 Tokyo by the way

Any luck? Do you see the same at your end?

Yes, I’ve answered to the message you sent to support@ . I’ve reproduces the issue and already working on it.

Ah ok thanks. I’ve worked round it for now by manually editing the DFM but obviously there’s a bug there somewhere.

Fixed the issue.

Here’s what caused it:

You used ' instead of " to define string constants in the statement (MS SQL driver profile you used expects " quotes). This caused the statement validator to enter into string constants looking for parameter names instead of skipping them. One of the constants contained text like Foo : Bar which actually crashed the parser (it was considered as definition of a statement parameter w/o a name). This crash is fixed now

Ah ok thanks. Not sure why the MS SQL driver profile is expecting double-quote characters since SQL Server itself uses singles.

Can I get the code fix to implement here pending the next release?

Actually MS SQL supports both doubles and singles. Yet since the single quotes are SQL-92 standard I guess I’ll need to add support for both kinds of quotes.

Unfortunately code fix won’t help you because you’d need to recompile the Schema Modeler to get it working. The only option is to wait for the next Beta drop.

There is a workaround - copy your script to a plain text editor, replace all ' with " and paste the script back. The resulting SQL script will be valid for MS SQL and won’t crash the Schema Modeler.

I’m logging an issue to add support for single quotes so you’ll see when it will be done./

Thanks, logged as bugs://79670

bugs://79670 got closed with status fixed.

Ok thanks :slight_smile:

Was this fix ever included in a release? I can’t see any mention of it in the March release, did it not make it in time?

Can you provide the fix so I can implement it here as it’s causing problems again?

It is in the March release as

79670: Wrong kind of text quotes (single vs double) is used when probing SQL statement for parameter names

Which exactly issues do you have?

That isn’t showing on this page:

https://www.remobjects.com/changelogs/?id={F9B2746C-4AEE-4B78-BFAC-B179CDE16FBA}

EDIT: I notice it’s there in the .NET version of DA - we’re using Delphi 10.2 As noted above. Has it not been fixed in this version?

The fix required has been made in the code Data Abstract for .NET package. Schema Modeler by itself relies on Data Abstract to perform some operations (including this one that failed).

So if you have an issue now this is most probably something different. Could you provide a tastcase and steps o reproduce the issue?

So to be clear, you’re saying the fix is included in the March release of Data Abstract for Delphi, despite it not being explicitly in the change log?

We’re not yet running this version but, if upgrading will fix this problem, we will try that.

It IS in the log, just in a different part of it. Btw this topic also contains a notification that the original issue has been fixed.

Ah ok I think I’m with you now, we’ll upgrade from the Nov release and that should sort it. Thanks.