|
| Submitted on: |
5/18/2004 10:45:54 AM |
| By: |
zd
|
| Level: |
Intermediate |
| User Rating: |
By 4 Users |
| Compatibility: |
ASP (Active Server Pages) |
| Views: |
11580 |
|
(About the author) |
|
|
|
' simple yet effective little piece of code to retrieve
' a single value from any SQL compliant data source. Handy for retrieving ID's, Descriptions or whatever!
|
| |
Terms of Agreement:
By using this article, you agree to the following terms...
- You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
- You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
- You may link to this article from another website, but ONLY if it is not wrapped in a frame.
- You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
|
' Author: zd
' Input: SQL to retrieve data with
' The index of the field you wish to retrieve
' Return: The value of the field
' Assume: Connection is established as [conn]...
Public Function GetData(vstrSQL, vintFieldIndex)
dim rs
rs.open vstrSQL, conn, 2, 1
if not rs.eof and not rs.bof then
GetData = rs.fields(vintFieldIndex)
end if
rs.close
End Function
|
|
Report Bad Submission
|
Your Vote
|
| |
Other User Comments
|
5/19/2004 7:32:06 AM: Deepak Kumar Shaw
whats is that??? (If this comment was disrespectful, please report it.)
|
5/21/2004 2:17:33 AM:
sdfsdfsdf (If this comment was disrespectful, please report it.)
|
8/29/2004 3:03:04 PM:
like to see it (If this comment was disrespectful, please report it.)
|
10/15/2004 6:28:51 AM:
this is a very good site.
thank u (If this comment was disrespectful, please report it.)
|
1/8/2005 4:31:55 AM:
This's so good. thanks, i like this website very much (If this comment was disrespectful, please report it.)
|
8/25/2005 8:19:55 AM: Yusuf
I cant see any codes to download (If this comment was disrespectful, please report it.)
|
8/20/2006 4:46:10 AM: yousif
yes (If this comment was disrespectful, please report it.)
|
10/17/2006 9:16:19 AM: asd
r u nuts (If this comment was disrespectful, please report it.)
|
1/23/2007 12:06:12 PM: sugar
asp help (If this comment was disrespectful, please report it.)
|
1/30/2008 2:17:19 AM: Mr Tuyen
Please send help me! Thanks! (If this comment was disrespectful, please report it.)
|
12/20/2008 10:28:18 AM: bosss
thanks for helping me (If this comment was disrespectful, please report it.)
|
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)
To post feedback, first please login.
|