How do you use OleDbLiteral

  • Thread starter Thread starter Heinz Kiosk
  • Start date Start date
H

Heinz Kiosk

I am trying to understand how you use OleDbLiteral in code.

I can't find a single code example in the .net reference or through google.

I've looked at three books. One didn't mention it, one has it in the index
but not the text, and one says in the text that it is outside the scope of
the book!

Any Microsoft people (or anyone else) out there who can explain the usage of
this crucial enumeration? How do you get from the enumeration symbols to the
values that they represent?

Tom
 
There are examples in MSDN of how to call OLEDB directly to get the
information, but I guess that doesn't help you much.

To get to the underlying values from the enumeration names, just cast to
integer.

For example,

OleDbLiteral x = OleDbLiteral.Binary_Literal;
int xValue = (int) x;
MessageBox.Show("Value is " + xValue.ToString());
 
Thank you Neil,

I am afraid I still don't understand how to make use of this information.
For example Quote_Prefix returns 15 and Quote_Suffix returns 28. What do I
do with these values to get '[' or ' " ' so that I can build a correct SQL
string? Can I call OLEDB directly from .net? How do I tell OLEDB about my
..NET OLEDbConnection? Or are these values static like ODBC scalars that get
mangled into appropriate SQL if you put them in your SQL string?

Tom
 
Back
Top