Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBCDataReader

Status
Not open for further replies.

murrayja

Programmer
May 6, 2000
90
US
When I call the method GetChar(i) I get an exception of the type "method is not supported".
Is this a "System.Data.OracleClient" problem or my problem?

OracleDataReader rdr = o_cmd.ExecuteReader();
while (rdr.Read())
{
// cols is previously extracted metadata for each col (field)
for (int i=0; i<cols.Count; i++) {
string typ = col.type.ToLower();
if (typ == "decimal")
sql += rdr.GetDecimal(i).ToString();
else if (typ == "char")
char ch = rdr.GetChar(i); // *** this fails


 
I'm not sure what version of the Oracle Data Provider you are using is but GetChar() isn't supported for Oracle 10g or later.

Have a look here for more information.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Thanks.
GetString() works.
I thought of trying it last night but I appreciate your help.
Its hard to know where to look for documentation.
 
Glad I could help [smile]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top