Miha
Tue Dec 09 01:24:12 CST 2003
Hi Peter,
Just out of curiosity, what database are you using.
--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
"Peter Stojkovic" <Peter.Stojkovic@gmx.net> wrote in message
news:uUtXdohvDHA.2304@TK2MSFTNGP12.phx.gbl...
> I know it is for example a double.
> But it will be interpreted by whom ever as a string.
> So only getstring works !! What a confusion !!
> Peter
>
>
> "Miha Markic" <miha at rthand com> wrote in message
> news:%23yhJSsnuDHA.3496@TK2MSFTNGP11.phx.gbl...
> > Hi Peter,
> >
> > If ODBC is returning a string then there is no other solution than
> performin
> > a conversion (Convert.ToInt32).
> > You might check the returing type by assigning the value to an object
and
> > see what type it is.
> >
> > --
> > Miha Markic - RightHand .NET consulting & software development
> > miha at rthand com
> >
> > "Peter Stojkovic" <peter.stojkovic@sms-eumuco.de> wrote in message
> > news:uqkFJinuDHA.3536@tk2msftngp13.phx.gbl...
> > > Using VS.2003 and ODBC
> > >
> > > I make a SELECT count(*) from table1.
> > > with ExecuteSQLSelect
> > >
> > > This must return always !!! a number-value .
> > >
> > > But if I try to read from the datareader with GetInt32 a get always a
> > > inValid cast operation exception .
> > > Only Getstring(0) works fine.
> > >
> > > Is there any solution for this behavior ???
> > >
> > >
> > > Thanks for any help
> > >
> > > Peter
> > >
> > >
> > > *** Sent via Developersdex
http://www.developersdex.com ***
> > > Don't just participate in USENET...get rewarded for it!
> >
> >
>
>