|
 |
ado_dotnet thread: Data Types in ADO
Message #1 by vsraghavan_in@h... on Wed, 10 Apr 2002 13:16:19
|
|
Hi there
I' ve retrived the Meta data of a table from Oracle database , I need to
match the data type of all the attributes in that table, to a compatible
datatype that ADO supports.Is there any built in methods available in ADO
for doing the same.
Help me for resolving the above issue.
With regards
Srinivas
Message #2 by Richard Ainsley <rainsley@p...> on Wed, 10 Apr 2002 15:30:32 -0700
|
|
The simpliest is to test how MS handles the type conversion. Create inside
Oracle a table whose purpose is to hold 1 same record which contains a
sample of every data type Oracle can use. Open a connection to your Oracle
database. Next define a OBDCDataAdapter and compose an SQL command to
retrieve the record (SELECT * FROM MyTestTable), the fill a dataset, then
create a dataview with the record in it. From there you can examine exactly
how Microsoft actually mapped the oracle data -- just place a break at that
point and examine the dataview properties ( record0 = dv.item(0) .......
field0 = dv.item(0).item(0) ).
Dim myDV = New DataView(MyDataSet.Tables("MyTestTable"))
Dim MyType s integer = myDV.item(0).item(0).GetType()
If you poke about, you can find the type constants with intellihelp...
----- Original Message -----
From: <vsraghavan_in@h...>
To: "ADO.NET" <ado_dotnet@p...>
Sent: Wednesday, April 10, 2002 6:16 AM
Subject: [ado_dotnet] Data Types in ADO
> Hi there
>
> I' ve retrived the Meta data of a table from Oracle database , I need to
> match the data type of all the attributes in that table, to a compatible
> datatype that ADO supports.Is there any built in methods available in ADO
> for doing the same.
>
> Help me for resolving the above issue.
>
> With regards
> Srinivas
|
|
 |