From: <CAR...@te...> - 2003-06-26 10:53:17
|
Hello=3A =3E I can=27t post the exact code (non-disclosure contracts =3E prevent me)=2C but here=27s the =22psuedo-code=22 example =3E (unchecked=2C so I don=27t even know if this actually =3E compiles) of what=27s happening=3A No problem=2C with the sample code you have sent is more than needed =3A)= =3E Once I get the datatable (similar to your C=23 example)=2C =3E I have this=3A =3E = =3E for (short c=3D0=3Bc=3Cc=5Fcount=3Bc++) =3E =7B =3E DataColumn * col =3D columns-=3Eget=5FItem( c )=3B =3E Object *o =3D row-=3Eget=5FItem( col )=3B =3E = =3E switch( Type=3A=3AGetTypeCode( o-=3EGetType() ) ) =3E =7B =3E =2E=2E=2E// enumerating the various typecodes from =3E TypeCode=3A=3ADecimal=2C etc=2E (they all work as expected) =3E = =3E =2E=2E// for the =22DataType=22 column=2C this case fires=2E=2E=2E =3E = =3E case TypeCode=3A=3AObject=3A =3E =7B Type *t =3D o-=3EGetType()=3B =3E n =3D Type=3A=3AGetTypeCode(t)=3B =3E // n is always 1 =3E =7D =3E break=3B Huummm i can=27t test it now ( i will try it later today )=2C but in firs= t = place think in that DataType column already has a Type value ( = System=2EString=2C System=2EArray=2C System=2EInt32=2C etc=2E=2E=2E) -- Best regards Carlos Guzm=E1n =C1lvarez Vigo-Spain |