Bug 4199

Getting error when I type in 'IN-' in character(6) column in datawindow in querymode 30 June, 2020

Jan Hoppe
02 March, 2020
Product: PowerBuilder Category: DataWindow
Version: 2019 Build:
Classification: Publishing: Public
Priority: P3
Status: Closed Reason: RESOLVED
Chris Pollach @Appeon 30 June, 2020
#13
Hi Jan;

  FYI:  https://community.appeon.com/index.php/qna/q-a/bug-4199-answer-for-jan-hoppe-querymode-question

HTH
Regards ... Chris
armando herrera @Appeon 29 June, 2020
#12
Hi Jan, 

Thank you very much for your response. We then proceed to close this ticket.
Please remember that you can always open another ticket.

Best Regards!
Jan Hoppe 26 June, 2020
#11
I am unsure what suggested select statement has to do with anything, but let us just close then matter.
armando herrera @Appeon 25 June, 2020
#10
Hi Jan,

Please give a try like this: "select * from table where code = 'IN'"

Regards!
armando herrera @Appeon 18 June, 2020
#9
Hi Jan, 

Did you have time to do some testing? 
Please do let us know if we can provide you with any further assistance.

Also, please keep in mind, that you are always welcome to open another ticket in case 
you need it.

Regards!
Jan Hoppe 08 June, 2020
#8
I have reluctantly accepted the answer Chris gave, even if I think it should be possible to generate a where clause saying something like " select * from table where code = 'IN-' .
armando herrera @Appeon 05 June, 2020
#7
Hi Jan,

It has been a while since we heard from you!. 

Are you still facing this problem?. 
Is there anything we can do to keep helping on this case? 

Regards!
#6
Hi Jan,
  
I'm just touching base with you about this ticket. 


Did we provide you with enough information to resolve this issue or have you resolved this issue?.


Please let us know if there is something else to support you with?. 


Regards!
armando herrera @Appeon 19 March, 2020
#5
Hi Jan, 

I'm checking with you if the response provided to you was helpful enough to resolve
your case. If so, can we proceed to close this ticket?.
 
Otherwise, do let us know if we can provide you with any further assistance.

Also, please keep in mind, that you are always welcome to open another ticket in case you want to report another bug.

Regards!
Chris Pollach @Appeon 02 March, 2020
#4
Hi Jan;

  The PB IDE is always connected to a default DBMS as per the "DB Profile" Painter. That is also reflected in the DB Painter as well. The IDE automatically opens up the last DB connection whenever a DW Object is being interacted with .. including a compile, full build, or DW editing.

  Note: Please do not use an DBMS "Reserved Words". That includes using them as PowerScript variable names as well BTW.

Regards ... Chris
Jan Hoppe 02 March, 2020
#3
Ok, but how come the error occurs even if no transaction is connected?
Chris Pollach @Appeon 02 March, 2020
#2
Hi Jan;
 
  Yes, this is not an issue within PowerBuilder, its because "IN" is a DBMS reserved word. In Query Mode, the DataWindow (DW) is building the SQL query as you type. However, PowerBuilder sends the SQL Query to the DBMS compiler with a "No Execute" directive. Which means that it just receives the message back from the SQL Parser - which it in turns presents this back to the DW and it turn to the user.

FYI:  https://www.w3schools.com/sql/sql_in.asp

Regards ... Chris
Jan Hoppe 02 March, 2020
#1
inbug.zip (7KB)

*Phenomenon: 
When I type in 'IN-' in the char(6) field in query mode and press enter I get an error saying "Specified criterion is invalid", this does not happen when I type "IX-" and other text.
Is it because "IN-" is some sort of keyword?


*Reproduce Steps:


Remarks:
OS:
Windows 10
Platform:
All
Database Type:
Microsoft SQL Server
Database Version:
2016