www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  ODBC    Bug when dealing with field types
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Posted
I have now discovered yet another bug in the ODBC driver. Here's how to reproduce it:

Set up a date field in a textbase, with the field options set to "Require Strictly Correct Type".

In the [ODBCFields] section of the textbase .INI file, set the date field to be treated as a Text field (type X).

Try to UPDATE the field with some text which will not be recognised as a date, eg "test". The result? The record is not updated, but there is no error message to tell you.

Here's what I think happens: the ODBC driver looks at the .INI file and concludes that the data is valid for a text field, so it acts as if all is well and does not present the usual "Data not valid for..." error. The textbase, meanwhile, recieves the data and decides that it is invalid for a strictly correct date. It rejects the entire update. BUT THE TWO DON'T COMMUNICATE. Either DB/Text is not generating an error or, more likely IMO, the ODBC driver doesn't check what DB/Text is saying to it.
 
Posts: 26 | Location: UK | Registered: Mon July 30 2001Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
Note: DB/TextWorks Date fields, strict or not, have an ODBC TEXT type by default, so adding the X to the textbase .INI file has no impact.

The behavior you describe is the way it's designed to work. Since UPDATE can modify multiple records, it's not feasible to return an error -- you wouldn't know to which of potentially several records the error applies. The reason is written to the textbase log file.

From the Error Messages section of the online help:

"For operations that can affect multiple records (for example, UPDATE/DELETE), an error is not necessarily returned immediately, but a Get Data ALL call will indicate how many records were affected. (Note that if you connect using the DB/Text ODBC Driver version 3.0, SQL_NO_DATA_FOUND=100 is returned if no records are affected.) If that number differs from the total number of records returned by the search, see the textbase log file to determine why the records were not changed."

Note that WebPublisher PRO XML output does indicate the reason along with identifying keyfields for each record which is not updated.
 
Posts: 1920 | Location: Woburn, MA, USA | Registered: Thu July 13 2000Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  ODBC    Bug when dealing with field types