473,480 Members | 1,847 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

datareader

TJS
how is variable dimensioned when assigned to result returned from datareader
function

e.g.
dim dtr AS ???????
dtr = getDataReader()


Nov 18 '05 #1
3 890
If I understand your question right, I think it's System.Object. You mast
cast it or convert it to what it should be or what you want, respectively.

-Darrin
"TJS" <no****@here.com> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl...
how is variable dimensioned when assigned to result returned from datareader function

e.g.
dim dtr AS ???????
dtr = getDataReader()

Nov 18 '05 #2
It depends on what type "getDataReader()" returns. What is
"getDataReader()"? If it returns a DataReader, then dtr should be declared
as one.

If you are unsure what type getDataReader() returns, set dtr to an object
temporarily and after the dtr assignment line, write:

response.write(dtr.getType.toString)

and this will tell you what type came back. Now, you can change the generic
object type to the specific type that came back.

"TJS" <no****@here.com> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl...
how is variable dimensioned when assigned to result returned from datareader function

e.g.
dim dtr AS ???????
dtr = getDataReader()

Nov 18 '05 #3
TJS
thanks,
that works

"Darrin J Olson" <da************@sio.midco.net> wrote in message
news:eC**************@TK2MSFTNGP09.phx.gbl...
If I understand your question right, I think it's System.Object. You mast
cast it or convert it to what it should be or what you want, respectively.

-Darrin
"TJS" <no****@here.com> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl...
how is variable dimensioned when assigned to result returned from

datareader
function

e.g.
dim dtr AS ???????
dtr = getDataReader()


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
363
by: Yasutaka Ito | last post by:
Hi, My friend had a little confusion about the working of DataReader after reading an article from MSDN. Following is a message from him... <!-- Message starts --> I was going thru DataReader...
6
750
by: Ravi | last post by:
Hi, I am not able to understand why a datareader needs a connection to the DB all the time. Here is what I tried. Sqlcommand cmd = ("select * from table1",con) // where con is the connection...
5
5747
by: Jason Huang | last post by:
Hi, Is it possible to bind DataReader to a DataGrid in C# windows form? And how? And can we update data in a DataSet by using the DataReader? Thanks for help. Jason
12
467
by: Thomas Scheiderich | last post by:
I have 2 dropdowns that are exactly the same and I don't want to re-read for each. Is there a way to do something like below where I read the data, bind to depCity1 and then bind to destCity2. ...
20
5507
by: Mark | last post by:
Hi all, quick question , a DataView is memory resident "view" of data in a data table therefore once populated you can close the connection to the database. Garbage collection can then be used to...
2
1560
by: Andrei Pociu | last post by:
In a typical ASP .NET Web Application (website), I'm currently using a class where I declare some public static objects. For example there's the place where I initialize the SqlConnection. Also...
1
3081
by: Brent | last post by:
I'm having a hard time wrapping my head around how to build a multi-dimensional array of n length out of a DataReader loop. Take this pseudo-code: ======================================= public...
7
3371
by: Varangian | last post by:
Hi all, the question I want to ask if the conversion of a DataReader to a Table looping through the DataReader is better than using the Fill Method of the DataAdapter... I'm asking because...
7
2891
by: Diffident | last post by:
Hello All, I would like to use DataReader based accessing in my Data Access Layer (DAL). What is considered to be a best practice while returning from a DAL method that executes a query and...
3
3375
by: Johnny Jörgensen | last post by:
I've got an error that I simply cannot locate: I've got a form in which I use a datareader object to read information from a db. After the read, I close the reader and I dispose of both the...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6758
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.