Field Data type.

D

Daniel Carollo

Good Afternoon everybody!

On Access 97, some tables were created with fields containing NULL. These
fields were of type Text (dbText, 10). The same queries in Access 2000 (and
2002) create fields of type binary (dbBinary, 9).
I simplified the queries to: SELECT NULL as MyField INTO MyTable;
Is there a way to force the type of field being created? The current
application is broken because a comparison on a string stored in a binary
field is case sensitive...

For practical reasons, it's not possible to leave the table structure intact
and insert the records, although that solves the problem. The table has to be
created "on the fly".

Thanks in advance for any help.

Daniel :)
 
A

Allen Browne

Try:
SELECT IIf((False), "", NULL) AS MyField INTO MyTable;

The trick sometimes works as an indicator for the data type that should be
used.
 
D

Daniel Carollo

Good Evening Allen!

Perfect, that does the trick!

Thank you very much indeed.

Daniel :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top