XmlSerializers problems...

Last days i got a strange error.

Could not load file or assembly CodeGenerator.XmlSerializers Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

CodeGenerator = my actual working project

even in fuslogvw.exe it seems to look for that strange assembly


-> Project Properties -> Build
-> Generate serialization assembly = ON
didnt work!


-> Debug
-> Exceptions
-> Reset ALL
WORKS!


details in: FileNotFoundException while calling web service from web service - MSDN Forums - couldn't locate myProject.XmlSerializers

String.Intern() Method

i knew that strings are immutable and that we should use Stringbuilder.

but the method String.Intern(inputString) i didnt know!

- the method looks up the intern string pool for inputString.
- if it founds it, it assigns the reference to thisone.
and it will be not created a new instance of the inputString.



consider memory consumption vs. performance !!!
we have more the performance problem than the memory consumption problem.

Link: Bob On Development » Optimize Memory Consumption Using String Interning

odp.net 1. Schritte und Fazit

#1
mit Enterprise Library 3 funzt odp.net nicht

wird nicht unterstützt
es fehlt di Oracle.DataAccess.Client.OracleClientFactory
ist erst in oracle client 11 drinnen

tried to install dll in GAC mit gacutil
but wrong version of Oracle.DataAccess.dll
when i open my .dll in reflector then i cant see a OracleClientFactory.
there is no Oracle.DataAccess.Client.OracleClientFactory in Oracle.DataAccess, Version=1.102.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342



#2
Default Werte von Storeds werden nicht unterstützt
like:
PNUM_FROM_INDEX NUMBER := NULL,
PNUM_TO_INDEX NUMBER := NULL,
wenn Parameter weggelassen werden kommt 06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to wenn Parameter dazu und .Value nicht gesetzt -> wert = null in db auch mit oracle 10g dbms funzt nicht!

Solution Param must be added to command, but it will not have db's default value in the next case: PNUM_TO_INDEX NUMBER := 100,

#3 beim aufruf im DAO ist die gleiche reihenfolge der params wie in plsql-signatur einzuhalten
auch mit oracle 10g

#4
Parameter weglassen mit Oracle10g
Test auf oracle 10G funzt auch nicht
{"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'SPC_RA_PG_TESTDATA'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"}
und wenn Parameter übergeben und .Value nicht setzen auch nicht!

#5
DateTime.MaxValue
Probleme mit Select, Insert OK
Fehler wenn dieses wieder geholt werden will (Select)

-----------------------------------------
was ändert sich?
in plsql
- kein TO_CLOB von xmltype
- XMLTYPE ist XMLTYPE und nicht CLOB
- reihenfolge der parameter


in DAO
getten von Out Parameter
// HACK: BEFORE: recordCount = Convert.ToInt64(countParam.Value);
recordCount = (long)((Oracle.DataAccess.Types.OracleDecimal)(countParam.Value)).Value;

Enterprise Library problem behoben mit:


using (Oracle.DataAccess.Client.OracleConnection conn = new Oracle.DataAccess.Client.OracleConnection(connectionString))
{
command.Connection = conn;
//Siag.DataAccess.Configuration.ConnectionProcessorConfigurationSection.Open(conn as System.Data.Common.DbConnection);
conn.Open();
Lesen (SELECT) von BLOB CLOB und XMLTYPE
immer über Storeds

resultItem.SetLargedatablobWithoutStatusChange(reader.IsDBNull(indexLargedatablob) ? null : (byte[])reader.GetOracleBlob(indexLargedatablob).Value);
resultItem.SetLargedateclobWithoutStatusChange(reader.IsDBNull(indexLargedateclob) ? null : reader.GetOracleClob(indexLargedateclob).Value);
resultItem.SetXmlcontentWithoutStatusChange(reader.IsDBNull(indexXmlcontent) ? null : reader.GetOracleXmlType(indexXmlcontent).GetXmlDocument());
Schreiben

param = new Oracle.DataAccess.Client.OracleParameter("PXML_PGTD_XMLCONTENT", Oracle.DataAccess.Client.OracleDbType.XmlType); if (toPersist.Xmlcontent != null) { param.Value = toPersist.Xmlcontent.InnerXml; } command.Parameters.Add(param);


Mapping zwischen Oracle Datatype - .net Datatype - .net reader Get Method http://download.oracle.com/docs/html/B10961_01/features.htm

Oracle Native Datatype
CLOB - Character data can store up to 4 gigabytes (4 GB).
BLOB - Unstructured binary data can store up to 4 gigabytes.


 

Latest Posts

Popular Posts