-
ASP vs. COM
QUESTION 1:
When using a VB COM object to connect to a database which is better to output
the HTML results. To do objASPResponse.write and a loop from the VB Object,
or to build a string with a loop and return the string to the ASP page, or
to return maybe an array(from rs.getRows) to the ASP page and do the loop
in the ASP page?
Question 2:
I usually just do everything is ASP, not in COM Objects. So can someone help
me through this. I usually do something like this to get data from a database:
Dim objConnTemp,objRSTemp,arryRS,strDSN
strDSN =
set objConnTemp=server.createobject("adodb.connection")
objConnTemp.CommandTimeout = 120
objConnTemp.ConnectionTimeout= 30
objConnTemp.ConnectionString = strDSN
objConnTemp.open
set objRSTemp = objConnTemp.Execute("sp_search")
if not objRSTemp.eof then
arryRS = objRSTemp.GetRows
end if
'loop through it here.
I usually don't use "ADODB.Command" or "ADODB.Recordset", but as I have been
looking at a lot of VB Sample Code, I see that most of them use both "ADODB.Command"
and "ADODB.Recordset". Should I now change my usual practices and do this
too? And if not then how in my VB code will I dim arryRS and objRSTemp.
Private objRSTemp as ?????
Private arryRS as As Variant ?????
Thanks to anyone that can help me out here. Also, any sample code is appreciated.
Similar Threads
-
By Emad Ramadan in forum ASP.NET
Replies: 4
Last Post: 09-30-2008, 07:12 AM
-
By Iain Munro in forum ASP.NET
Replies: 0
Last Post: 02-22-2002, 07:44 AM
-
By sahar in forum ASP.NET
Replies: 2
Last Post: 12-10-2000, 06:18 PM
-
By Keith Franklin, MCSD in forum Talk to the Editors
Replies: 18
Last Post: 09-27-2000, 11:48 AM
-
By Aidan in forum ASP.NET
Replies: 1
Last Post: 04-21-2000, 06:52 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|