How can I customize null value handling with cursor-based fetch?

I am using the cursor-based 'fetch' command (from the Database Toolbox) to read data from a database. However, the way null values are read differs across operating systems. Is there a global customization I can use to dictate the way fetch reads null values? The 'databaseImportOptions'/'SQLImportOptions' functions do not work for this import method.

 Accepted Answer

Use the ‘setdbprefs’ function to specify how null values are read. Specifically, the “NullNumberRead” and “NullStringRead” fields specify how null numeric and character data is read into MATLAB.

More Answers (0)

Products

Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!