Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Apart from obtaining a value using blabla.getString(0) for example, are there other ways of obtaining it (other syntax?) for example by specifying the field name instead?
Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Posted

er......not a dropdown

but a value from a database field...

Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Posted
Well what is blahbla? Is that a xxxDataReader or..? You can use xxxDataReader["column"]; (note that it returns an object)
Gamer extraordinaire. Programmer wannabe.
Posted

yeap

it is a datareader

i see...

thanx, just found out that i can do the same with a datarow in a dataset...

 

er.....i have another question

 

dr("UserName") = DirectCast(dr("UserName"), String).ToUpper

 

dr is a datarow

 

in my db, username is declared as a text type

is it necessary to convert it to a string type?

can i directly use it?

Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Posted

i see, so a data field in a datarow is generally viewed as an object?

so the field type which i state in the ms access database is not recognised in .net till i convert it?

like in my case, the field is of a text type in the database table, but i have to convert it to string before i can use it?

Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Posted
I ment to cast it before using it, by that I mean manipulating the data in some way or to perform calculations. If you just want the value then object.ToString() should work (like Robby said)
Gamer extraordinaire. Programmer wannabe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...