1. Roy Bungert
  2. PowerBuilder
  3. Wednesday, 27 March 2024 15:20 PM UTC

Hello,

at the moment I'm a little bit confused: 

If there is a typo at a field name of a SELECT statement I will get an error message. But I don't get an error message with an UPDATE or INSERT statement. Until now I was very sure that a message would always appear?!?!

I always have "Display Database Warnings"  at Options - Script enabled. Database is SQL Anywhere.

Any hints

Regards

Roy

 

Arnd Schmidt Accepted Answer Pending Moderation
  1. Thursday, 28 March 2024 15:10 PM UTC
  2. PowerBuilder
  3. # 1

Have you done an edit source and only changed the SQL Select before?

The definition of the db columnnames that will be updated or inserted are not part a of the SQL Select Statement.

The corresponding database colomnnames are stored as properties of the column definitions.

You can try to use edit source, search for the specific columnname and will understand what I mean.

Normally the PowerBuilder Datawindow Painter should not create such differences/anomalies.

hth

Arnd

Comment
There are no comments made yet.
Roy Bungert Accepted Answer Pending Moderation
  1. Thursday, 28 March 2024 06:52 AM UTC
  2. PowerBuilder
  3. # 2

Here an example:

SELECT:

SELECT description into :ls_descrition from log;    --> ok

SELECT descrition into :ls_descrition from log;   --> Database  C0038: SQLSTATE = S0002[SAP][ODBC DRIVER][SQL ANYWHERE]Column 'descrition' not found

 

UPDATE:

Update log set description = 'Test';              --> ok

Update log set descrition = 'Test';                 --> Not ok but no error message

 

Why there's no error message "-->Database  C0038: SQLSTATE = S0002[SAP][ODBC DRIVER][SQL ANYWHERE]Column 'descrition' not found"?

 

 

Comment
There are no comments made yet.
Arnd Schmidt Accepted Answer Pending Moderation
  1. Wednesday, 27 March 2024 23:37 PM UTC
  2. PowerBuilder
  3. # 3

Hi Roy,

as long as the column is not involved in an INSERT or UPDATE statement.
Why should there be an error?

hth

Arnd

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.