Exforsys

Online Training

Problem with Object Conversion [in vb.net]

This is a discussion on Problem with Object Conversion [in vb.net] within the Microsoft .NET Tutorials and Articles forums, part of the Articles and Tutorials category; Hi All ! esp. For Seniors i have the :- code { Dim DrObj as Object = ksDr.KSGetValue(\"SELECT SetId FROM ...


Go Back   Exforsys > Articles and Tutorials > Microsoft .NET Tutorials and Articles

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-28-2004, 02:14 PM
Junior Member
 
Join Date: Sep 2004
Posts: 4
Kartik
Problem with Object Conversion [in vb.net]


Hi All !

esp. For Seniors
i have the :- code
{
Dim DrObj as Object = ksDr.KSGetValue(\"SELECT SetId FROM SetDetails\&quot
Dim dobj as integer = DrObj

If dobj =0
blah blah
blah blah

}

KSGetValue is a custom-Sub which Returns a value thru a Select Query !
Can the same be Done as

dobj = Conversion.Int(DrObj)

dobj = Cint(DrObj)

Dim dobj as integer = DrObj

Which one of these 3 is Recommended ???

Please do Reply with Solution....
Shankar/Kartik.

Post edited by: Kartik, at: 2004/12/29 09:52
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-28-2004, 02:56 PM
Junior Member
 
Join Date: Sep 2004
Posts: 4
Kartik
Re:Problem with Object Conversion [in vb.net]

Clarification :


KSGetValue returns a Scalar Object ;

But then; In my Code-Blocks; where i\'m Retrieving a Particular Single Entry From SQL back-end; i\'m Not Getting The Value i wanted the Code to Return ?!



So, i was asking Which among these 3 to use ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit Tech FAQ 0 07-03-2004 08:27 PM
comp.lang.eiffel Frequently Asked Questions (FAQ) Franck Arnaud Tech FAQ 0 06-28-2004 03:43 PM


All times are GMT -4. The time now is 10:51 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.