Home > Archive > SQL Anywhere ultralite > September 2005 > 9.0.2.2451 ULDataAdapter.Fill









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 9.0.2.2451 ULDataAdapter.Fill
forums.sybase.com

2005-09-03, 9:23 am

I have ported some pocketpc code to use the ADO.NET stuff. There is one
difference between the ultralite provider and all other providers I'm aware
of : if using a schema (i.e. .xsd or 'typed dataset') and calling the
adapter Fill(<dataset>, <tablename> ) overload the result set will have
qualified column names. Example:

*** dataset ***
<?xml version="1.0" standalone="yes"?>
<xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Diagnosis">
<xs:complexType>
<xs:sequence>
<xs:element name="IH_Code" type="xs:string" minOccurs="0" />
<xs:element name="ICD9_Code" type="xs:string" minOccurs="0" />
<xs:element name="Description" type="xs:string" minOccurs="0"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

*** fill ***
DiagnosisDataSet ds = new DiagnosisDataSet();
adapter.Fill(ds, ds.Tables[0].TableName);

Now the data is populated but the adapter has added columns
Diagnosis.IH_Code, Diagnosis.ICD9_Code etc. I know it is possible to map
the columns -- but I think this is a bug since no other data provider does
this including iAnywhere.Data.AsaClient.


Philippe Bertrand

2005-09-06, 1:23 pm

Our SQL processor over-qualifies names to ensure uniqueness. This can be
seen when looking at the schema for "SELECT * FROM t".

It would be difficult to change this for an EBF since it could potentially
break applications. We will discuss it further internally.

For now I suggest you alias or map the columns.

Sorry for the inconvenience,

--
- Philippe Bertrand
iAnywhere Solutions, Inc.

Please include in your subject line what UltraLite API are you using
(I.E. UltraLite.NET, Native UltraLite for Java, Embedded SQL, C++,
(pure) Static Java UltraLite, etc.). Please include version and BUILD
numbers in your post.


Dave Joyner

2005-09-06, 8:23 pm

Thanks. I can work around. By the way, the provider is working very well
for me so far. Good work!

Dave Joyner

"forums.sybase.com" <d4ljoyn@yahoo.com> wrote in message
news:4319a96f$1@foru
ms-1-dub...
>I have ported some pocketpc code to use the ADO.NET stuff. There is one
>difference between the ultralite provider and all other providers I'm aware
>of : if using a schema (i.e. .xsd or 'typed dataset') and calling the
>adapter Fill(<dataset>, <tablename> ) overload the result set will have
>qualified column names. Example:
>
> *** dataset ***
> <?xml version="1.0" standalone="yes"?>
> <xs:schema id="NewDataSet" xmlns=""
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
> <xs:element name="NewDataSet" msdata:IsDataSet="true">
> <xs:complexType>
> <xs:choice maxOccurs="unbounded">
> <xs:element name="Diagnosis">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="IH_Code" type="xs:string" minOccurs="0" />
> <xs:element name="ICD9_Code" type="xs:string" minOccurs="0"
> />
> <xs:element name="Description" type="xs:string" minOccurs="0"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:choice>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> *** fill ***
> DiagnosisDataSet ds = new DiagnosisDataSet();
> adapter.Fill(ds, ds.Tables[0].TableName);
>
> Now the data is populated but the adapter has added columns
> Diagnosis.IH_Code, Diagnosis.ICD9_Code etc. I know it is possible to map
> the columns -- but I think this is a bug since no other data provider does
> this including iAnywhere.Data.AsaClient.
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com