1. AddNew with ADO Recordset doesn't seem to work
Hi,
Can Anyone help me? I seem to have been going round in Circles for days!!
I'm Trying to use an ADO Recordset with no Recordsource to Hold Data in an
ASP page (Which will later hold the data for the session). Specifically,
this data is comming from an Index Server Recordset, which I iterate through
and add certain records into the new recordset. However, When I try to
display the contents of the recordset, all the added data is blank! Any
Ideas? The code is below.
Thanks
<html>
<head>
<TITLE>Search Form</TITLE>
</head>
<body>
<%
' ********* Subs used to fill Category1 and Category2 Recordsets *********
Set Q = Server.CreateObject("Ixsso.Query")
Q.DefineColumn "Category1 (DBTYPE_WSTR) =
d5cdd505-2e9c-101b-9397-08002b2cf9ae documenttype"
'Q.Columns = "Category1, Category2"
Q.Columns = "Category1, Path"
'Q.SortBy = "Category1[a],Category2[a]"
Q.SortBy = "Category1[a]"
Q.MaxRecords = 300
Set RSCat1 = Q.CreateRecordset("nonsequential")
Set rst = Server.CreateObject("ADODB.Recordset")
rst.fields.Append "Category1", adChar, 100
rst.fields.refresh
rst.Open
RSCat1.MoveFirst
Cat1 = RSCat1("Category1").value
RSCat1.MoveNext
rst.AddNew "Category1",Cstr(Cat1)
rst.Fields("Category1").Value = Cstr(Cat1)
rst.update
%> **<%response.write(Cat1)%>**<BR><%
%>**<% response.write(rst.Fields("Category1").Value) %>**<BR><%
do until RSCat1.Eof
if Cat1 = RSCat1("Category1").value then
RSCat1.MoveNext
else
if not RSCat1("Category1").value = "" then
Cat1 = RSCat1("Category1").value
%> **<%response.write(Cat1)%>**<BR><%
rst.AddNew
rst.Fields("Category1").Value = Cat1
rst.update
%>**<% response.write(rst.Fields("Category1").Value) %>**<BR><%
end if
RSCat1.MoveNext
end if
loop
%><BR><BR><BR><%
rst.MoveFirst
do until rst.Eof
if rst.Fields("Category1").Value = "" then
%>Blank<BR><%
else
%>**<% response.write(rst.Fields("Category1").Value) %>**<BR><%
end if
rst.MoveNext
loop
rst.Close
%>
</body>
2. discontinued support for sql7?
3. Addnew Doesn't Addnew!
4. Partial Search
5. Database Doesn't Appear in Enterprise Manager
6. Error on running DTS
7. Raiserror message from Trigger doesn't appear in Access 2000 form
8. Giant database - will it work
9. Indexed view doesn't appear to be using index on queries
10. Scheduled task doesn't appear to finish
11. SQL Server 7.0 doesn't appear backward compatible
12. Mail profile works but doesn't appear !
13. Server Doesn't Appear in ODBC Panel?