![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack (1) | Thread Tools | Display Modes |
#1
| ||||
| ||||
| I've never coded in ASP -- but see enough of it, especially in conversion to ASP.NET, that I need at least a reading knowledge of it. It the following snippet valid ASP/ADO code: Code: <%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/db/northwind.mdb"))
set sqlString = "Select * from Customers"
rs = conn.Execute(sqlString)
conn.close
do until rs.EOF
for each x in rs.Fields
Response.Write(x.name)
Response.Write(" = ")
Response.Write(x.value & "<br />")
next
Response.Write("<br />")
rs.MoveNext
loop
rs.close
%>
|
| Sponsored Links |
|
#2
| ||||
| ||||
| Nope, conn.close would have to be placed after rs.close or you would get an error.
__________________ jmurrayhead If you agree with me... click the icon! If my post solved your problem, click the button in the lower right-hand corner of the post.Join our Folding team: DeveloperBarn Folding |
|
#3
| ||||
| ||||
| Ah ha. So then I could think of a RecordSet is like a DataReader in my .NET oriented brain! There being nothing like a DataTable object in ADO into which I could return the entire result set. |
|
#4
| ||||
| ||||
| Quote:
![]() Also, you will want to "set rs = conn.execute(sqlString)", not just "rs = conn.execute(sqlString)" |
|
#5
| ||||
| ||||
| Quote:
|
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wizard1 error The command 'MoveComplete' is not valid | peebman2000 | .Net Development | 10 | April 28th, 2008 02:52 PM |
LinkBacks (?)
LinkBack to this Thread: http://www.developerbarn.com/asp-development/102-valid-asp-ado-code.html | ||||
| Posted By | For | Type | Date | |
| [SOLVED] Is this valid ASP/ADO Code - DeveloperBarn Forums | This thread | Refback | April 10th, 2008 03:54 PM | |