doubt with Cursor type_warning

1

I can not understand how this type of cursor works, does anyone know or have an example in SQL? In the documentation says this:

  

Specifies that a warning message is sent to the client when the cursor is implicitly converted from the requested type to another.

I do not know what you mean by implicitly converting it into another type, in what cases does that happen?

greetings

    
asked by fer 30.10.2017 в 13:43
source

1 answer

1

An implicit conversion occurs when the declared type and the type of the value do not match and a conversion is not explicitly indicated. As for example:

string variable = 2;

Depending on the language, these types of conversions are not allowed, fail or some conversions if they occur and others do not. Something similar happens with the cursors. Since they have a declared type, and the query on which we use the cursor is the " value " of the cursor and has a specific type.

The cursors have a defined type when they are declared. If the TYPE_WARNING is set, it sends a warning when the declared type and the " real " type of the cursor do not match.

For example, if the cursor is declared as KEYSET but the query passed to it contains a table without a unique index, the cursor will behave as STATIC .

There is a table with the implicit conversions in the documentation that illustrates what implicit conversions there are and what will be the behavior depending on the discordance of types.

    
answered by 30.10.2017 / 16:48
source