Thanks but I was hoping to get help on my specific issue. I know to connect
to a db and retrieve records and bind them if needed. But I'm not really
sure how to return the data from the record from the function itself. It's
a very basic question really. A Function returns A single value right? So
how can I use a Function to return a db record and the record contains
multiple fields/columns? Do I have the function return an "Object" instead
of a String? If so, in my Sub that calls the function, how can I tell what
field is what in the object? Thanks
Make sense?
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OU****************@TK2MSFTNGP14.phx.gbl...
Humm...you should have been able to find plenty of examples. since there
are a number of ways to go about it (depending on what your needs are),
I'll
point you to a couple useful resources:
http://www.dotnetjunkies.com/quickst...ataaccess.aspx
http://www.asp101.com/articles/jay/a...et/default.asp
Hope this helps,
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"D. Shane Fowlkes" <sh**********@h-o-t-m-a-i-l.com> wrote in message
news:uu******************@TK2MSFTNGP12.phx.gbl... This may be a very basic question but it's something I've never done
before. I've looked at a couple of my favorite sites and books and can't find an
answer either. I can write a Function to return a single value. No big
deal. But I want to call a Function from another Sub and the function
finds and returns an entire db record. Using ASP.NET (VB!), how can this be
done
and how can I differentiate between the fields/columns?
For example:
My Sub()
Dim X As what? String? DataReader?
...do stuff....
X = MyFunction()
...do more stuff using the valueS stored in X
End Sub
My Function() As What? String? DataReader?
...go find record in db and return all fields
End Function
Thanks
-S