I vote that you should be a VB expert.
DAP are probably the most difficult possible component for any
developers. Probably more difficult than anything that Ajax has; more
difficult than ASP; etc.
It's a great object model. It's just that there ARENT any examples
(well MS has one good set of examples; I just can't find it).
-Aaron
PS - here is some VB i wrote to deal with DAPs; this is a LOT more code
than you need.. i was basically constructing DAPs dynamically; thru
ASP.
<%
'-----------------------------------------------------
Sub writeDap(DAPID)
Dim rstDap
Set rstDap = Server.createobject("ADODB.Recordset")
rstDap.ActiveConnection = Session("cnn")
rstDap.Source = "select * FROM OR_DAP WHERE DAPID = " & DAPID
rstDap.Open
If rstDap.EOF = True Then
writePretty "<BR>Unknown DAPID :" & DAPID & ""
response.end
End If
Dim BaseTable
Dim DapTitle
Dim AltUrl
BaseTable = rstDap.fields("BASETABLE").value
DapTitle = rstDap.fields("NAME").value
AltUrl = rstDap.fields("ALTURL").value
Select case Len(AltUrl)
Case 0
response.write "<!-- DAPID " & DAPID & " AltUrl Length 0-->"
Case Else
response.write "<!--Dap Generated by AltUrl: " & ALTURL & "-->"
Call writeTitle(DAPID, DAPTITLE)
Call WriteUrl(Server.MapPath(AltUrl))
exit sub
End Select
'get all fields from base table
Dim rstVerifyTable
Set rstVerifyTable= Server.createobject("ADODB.Recordset")
rstVerifyTable.ActiveConnection = Session("cnn")
rstVerifyTable.Source = "select TOP 1 * FROM sysobjects where name
like '" & BaseTable & "'"
rstVerifyTable.Open
If rstVerifyTable.EOF = True Then
writePretty "<BR>Table Doesn't Exist :" & BASETABLE & ""
response.end
End If
'get all fields from base table
Dim rstAllFields
Set rstAllFields = Server.createobject("ADODB.Recordset")
rstAllFields.ActiveConnection = Session("cnn")
rstAllFields.Source = "select TOP 1 * FROM [" & BaseTable & "]"
rstAllFields.Open
If rstAllFields.EOF = True Then
writePretty "<BR>Base Table Doesn't Exist :" & BASETABLE & ""
response.end
End If
writePretty "<B>DAPID = " & DAPID & "</B>"
Call writeHtmlHead(DAPID)
Call writeTitle(DAPID, DAPTITLE)
Call writeDscHeader(DAPID)
Call writeConnectionString(DAPID, Application("cnnString"))
Call writeFieldSetHeader(DAPID)
Call writeFieldSets(DAPID, rstAllFields)
Call writeFieldSetFooter(DAPID)
Call writeGroupLevel(DAPID, BASETABLE)
Call writeDscFooter(DAPID)
Call WriteDapStyles(DAPID)
Call WriteDocProperties(DAPID)
Call WriteDapValidation(DAPID)
Call writeFormHeader(DAPID)
Call writeHeader(DAPID)
Call writeLabelHeader(DAPID)
Call writeLabels(DAPID)
Call writeLabelFooter(DAPID)
Call writeFieldHeader(DAPID)
Call writeFields(DAPID)
Call writeFieldFooter(DAPID)
Call writeNavigation(DAPID)
Call writeFormFooter(DAPID)
Call writeFooter(DAPID)
End Sub
'-----------------------------------------------------
Sub writeFormStart(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFormStart-->" & CHR(13) &
CHR(10)
Dim S_formName
Dim S_action
writePretty "<FORM NAME='form" & DAPID & "' method='POST'
action='pageD_1.asp?DAPID=" & DAPID & "' id='form" & DAPID & "'>"
End Sub
'-----------------------------------------------------
Sub writeFormEnd(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFormEnd-->" & CHR(13) &
CHR(10)
writePretty "</FORM>"
End Sub
'-----------------------------------------------------
Sub writeHtmlHead(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeHtmlHead-->" & CHR(13) &
CHR(10)
writePretty "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0
Transitional//EN'>"
writePretty "<HTML xmlns='
http://www.w3.org/TR/REC-html40' xmlns
= "
writePretty "'urn:schemas-microsoft-com
ffice
ffice' xmlns:x = "
writePretty "'urn:schemas-microsoft-com
ffice:excel' xmlns:a = "
writePretty "'urn:schemas-microsoft-com
ffice:access' xmlns:dt = "
writePretty "'uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'>"
'writePretty "<HEAD>"
End Sub
'-----------------------------------------------------
Sub writeTitle(DAPID, TITLE)
writePretty CHR(13) & CHR(10) & "<!-- writeTitle-->" & CHR(13) &
CHR(10)
' writePretty "<TITLE>" & TITLE & "</TITLE>"
writePretty "<B>" & TITLE & "</B>"
End Sub
'-----------------------------------------------------
Sub writeDscHeader(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeHeader-->" & CHR(13) &
CHR(10)
writePretty "<META content=Access.Application name=ProgId>"
writePretty "<META name=VBSForEventHandlers VALUE='TRUE'>"
writePretty "<META http-equiv=Content-Type content='text/html;
charset=windows-1252'>"
writePretty "<META content=10.00.2225 name=DesignerVersion>"
writePretty "<META content='HTML 4.0' name=vs_targetSchema>"
writePretty "<OBJECT id=MSODSC tabIndex=-1
classid=CLSID:0002E553-0000-0000-C000-000000000046>"
writePretty "<PARAM NAME='XMLData' VALUE=" & CHR(34)
writePretty "<xml xmlns:a='urn:schemas-microsoft-com
ffice:access'>"
writePretty "<a
ataSourceControl>"
writePretty "<a:OWCVersion>10.0.0.2621</a:OWCVersion>"
End Sub
'-----------------------------------------------------
Sub writeConnectionString(DAPID, cnnString)
writePretty CHR(13) & CHR(10) & "<!-- writeConnectionString-->" &
CHR(13) & CHR(10)
writePretty "<a:ConnectionString>"
writePretty cnnString
writePretty "</a:ConnectionString>"
Exit Sub
writePretty "<a:ConnectionString>"
writePretty "Provider=SQLOLEDB.1;"
writePretty "Integrated Security=SSPI;"
writePretty "Persist Security Info=False;"
writePretty "Initial Catalog=VAPS_20050328;"
writePretty "Data Source=PDC;"
writePretty "Use Procedure for Prepare=1;"
writePretty "Auto Translate=True;"
writePretty "Packet Size=4096;"
writePretty "Workstation ID=SQL3;"
writePretty "Use Encryption for Data=False;"
writePretty "Tag with column collation when possible=False"
writePretty "</a:ConnectionString>"
End Sub
'-----------------------------------------------------
Sub writeFieldSetHeader(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFieldSetHeader-->" &
CHR(13) & CHR(10)
writePretty "<a:MaxRecords>100000</a:MaxRecords>"
writePretty "<a:GridX>24</a:GridX>"
writePretty "<a:GridY>24</a:GridY>"
writePretty "<a:OfflineType>2</a:OfflineType>"
writePretty "<a:OfflinePublication></a:OfflinePublication>"
writePretty "<a:XMLLocation>0</a:XMLLocation>"
writePretty "<a:XMLDataTarget></a:XMLDataTarget>"
writePretty "<a:ConnectionFile></a:ConnectionFile>"
writePretty "<a:ElementExtension>"
writePretty "<a:ElementID>D_IONavLabel</a:ElementID>"
writePretty "<a:RecordsetLabel>D_IO |0 of |2;D_IO |0-|1 of
|2</a:RecordsetLabel>"
writePretty "</a:ElementExtension>"
End Sub
'-----------------------------------------------------
Sub writeFieldSets(DAPID, rstFields)
writePretty CHR(13) & CHR(10) & "<!-- writeFieldSets-->" & CHR(13) &
CHR(10)
Dim i
Dim fldName
i = 0
For i = 0 to (rstFields.fields.count - 1)
fldName = rstFields.fields(i).name
If Len(fldName) = 0 Then writePretty "<BR>Zero-Length fldName
detected: i = " & i & "<BR>"
writePretty "<a:ElementExtension>"
writePretty "<a:ElementID>" & fldName & "</a:ElementID>"
writePretty "<a:ControlSource>" & fldName & "</a:ControlSource>"
writePretty "<a:ChildLabel>" & fldName & "_Label</a:ChildLabel>"
writePretty "</a:ElementExtension>"
Next
End Sub
'-----------------------------------------------------
Sub writeFieldSetFooter(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFieldSetFooter-->" &
CHR(13) & CHR(10)
writePretty "<a
atamodel a:version='0816'>"
End Sub
'-----------------------------------------------------
Sub writeDscFooter(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFieldSetFooter-->" &
CHR(13) & CHR(10)
writePretty "<a:SchemaRowsource a:id='dbo.D_IO' a:type='dscTable'>"
writePretty "<a:SchemaField a:id='IoNumber' a:datatype='3' a:size='4'
a:iskey='1'/>"
writePretty "<a:SchemaField a:id='IoDescription' a:datatype='200'
a:size='255'/>"
writePretty "<a:SchemaField a:id='CAMPAIGN' a:datatype='200'
a:size='20'/>"
writePretty "<a:SchemaField a:id='SUBCAMPAIGN' a:datatype='200'
a:size='20'/>"
writePretty "<a:SchemaField a:id='BUSINESSOWNER' a:datatype='200'
a:size='50'/>"
writePretty "<a:SchemaField a:id='LASTPARSEDATE' a:datatype='135'
a:size='8'/>"
writePretty "<a:SchemaField a:id='ISTMP' a:datatype='11' a:size='1'/>"
writePretty "<a:SchemaField a:id='PROFITCENTER' a:datatype='129'
a:size='6'/>"
writePretty "<a:SchemaField a:id='F_CHARGESCT' a:datatype='3'
a:size='4'/>"
writePretty "<a:SchemaField a:id='DATEENTERED' a:datatype='135'
a:size='4'/>"
writePretty "<a:SchemaField a:id='ENTEREDBY' a:datatype='200'
a:size='50'/>"
writePretty "<a:SchemaField a:id='F_OPENPOCT' a:datatype='3'
a:size='4'/>"
writePretty "</a:SchemaRowsource>"
writePretty "<a:RecordsetDef a:id='D_IO' a:source='dbo.D_IO'>"
writePretty "<a
ageField a:id='IoNumber'/>"
writePretty "<a
ageField a:id='IoDescription'/>"
writePretty "<a
ageField a:id='CAMPAIGN'/>"
writePretty "<a
ageField a:id='SUBCAMPAIGN'/>"
writePretty "<a
ageField a:id='BUSINESSOWNER'/>"
writePretty "<a
ageField a:id='LASTPARSEDATE'/>"
writePretty "<a
ageField a:id='ISTMP'/>"
writePretty "<a
ageField a:id='PROFITCENTER'/>"
writePretty "<a
ageField a:id='F_CHARGESCT'/>"
writePretty "<a
ageField a:id='DATEENTERED'/>"
writePretty "<a
ageField a:id='ENTEREDBY'/>"
writePretty "<a
ageField a:id='F_OPENPOCT'/>"
writePretty "</a:RecordsetDef>"
writePretty "</a
atamodel>"
writePretty "</a
ataSourceControl>"
writePretty "</xml>'></OBJECT>"
writePretty "<META content='MSHTML 6.00.2800.1476' name=GENERATOR>"
End Sub
'-----------------------------------------------------
Sub writeGroupLevel(DAPID, BASETABLE)
writePretty CHR(13) & CHR(10) & "<!-- writeGroupLevel-->" & CHR(13) &
CHR(10)
writePretty "<a:GroupLevel>"
writePretty "<a:RecordSource>" & BASETABLE & "</a:RecordSource>"
writePretty "<a
efaultSort></a
efaultSort>"
writePretty "<a:HeaderElementId>HeaderDIO</a:HeaderElementId>"
writePretty "<a:FooterElementId></a:FooterElementId>"
writePretty "<a:CaptionElementId>CaptionDIO</a:CaptionElementId>"
writePretty
"<a:RecordNavigationElementId>NavigationDIO</a:RecordNavigationElementId>"
writePretty "<a
ataPageSize>10</a
ataPageSize>"
writePretty "<a:GroupFilterControl></a:GroupFilterControl>"
writePretty "<a:AlternateRowColor>#E6E6E6</a:AlternateRowColor>"
writePretty "</a:GroupLevel>"
End Sub
'-----------------------------------------------------
Sub writeHeader(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeHeader-->" & CHR(13) &
CHR(10)
writePretty ""
End Sub
'-----------------------------------------------------
Sub WriteDapStyles(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- WriteDapStyles-->" & CHR(13) &
CHR(10)
Dim S_URL
S_URL = Server.MapPath("incStyles.inc")
WriteUrl(S_URL)
End Sub
'-----------------------------------------------------
Sub writeLabelHeader(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeLabelHeader-->" & CHR(13) &
CHR(10)
writePretty ""
End Sub
'-----------------------------------------------------
Sub writeLabels(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeLabels-->" & CHR(13) &
CHR(10)
writePretty ""
End Sub
'-----------------------------------------------------
Sub writeLabelFooter(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeLabelFooter-->" & CHR(13) &
CHR(10)
writePretty ""
End Sub
'-----------------------------------------------------
Sub writeFieldHeader(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFieldHeader-->" & CHR(13) &
CHR(10)
writePretty ""
End Sub
'-----------------------------------------------------
Sub writeFields(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeField-->" & CHR(13) &
CHR(10)
writePretty ""
End Sub
'-----------------------------------------------------
Sub writeFieldFooter(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFieldFooter-->" & CHR(13) &
CHR(10)
writePretty ""
End Sub
'-----------------------------------------------------
Sub WriteDocProperties(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeProperties-->" & CHR(13) &
CHR(10)
writePretty "<!--[if gte mso 9]>"
writePretty "<XML>"
writePretty "<o
ocumentProperties>"
writePretty "<o:Author>aaron kempf</o:Author>"
writePretty "<o:LastAuthor>aaron kempf</o:LastAuthor>"
writePretty "<o:Revision>1</o:Revision>"
writePretty "<o:TotalTime>0</o:TotalTime>"
writePretty "<o:Created>2005-03-13T22:56:15Z</o:Created>"
writePretty "<o:LastSaved>2005-03-13T22:56:57Z</o:LastSaved>"
writePretty "<o:Version>10.2625</o:Version>"
writePretty "</o
ocumentProperties>"
writePretty "<o:OfficeDocumentSettings>"
writePretty "<o
ownloadComponents/>"
writePretty "<o:LocationOfComponents Href='file:///\\'/>"
writePretty "</o:OfficeDocumentSettings>"
writePretty "</xml>"
writePretty "<![endif]->"
End Sub
'----------------------------------------------------
Sub WriteDapValidation(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- WriteDapValidation-->" & CHR(13)
& CHR(10)
Dim S_URL
S_URL = Server.MapPath("incDAP_validation.inc")
WriteUrl(S_URL)
End Sub
'----------------------------------------------------
Sub writeNavigation(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeNavigation-->" & CHR(13) &
CHR(10)
writePretty "<TBODY>"
writePretty "<TR>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavFirst id=D_IONavFirst tabIndex=1 height=20
src='owc://GIF/#11200' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavPrevious id=D_IONavPrevious tabIndex=2 height=20
src='owc://GIF/#11202' width=20></TD>"
writePretty "<TD style='VERTICAL-ALIGN: middle; WIDTH: 100%;
TEXT-ALIGN: center' noWrap><SPAN class=MsoNavRecordsetLabel
id=D_IONavLabel style='VISIBILITY: hidden' tabIndex=3>D_IO |0-|1 of
|2</SPAN></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavNext id=D_IONavNext tabIndex=4 height=20
src='owc://GIF/#11204' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavLast id=D_IONavLast tabIndex=5 height=20
src='owc://GIF/#11206' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavAddNew id=D_IONavNew tabIndex=6 height=20
src='owc://GIF/#11208' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavDelete id=D_IONavDelete tabIndex=7 height=20
src='owc://GIF/#11210' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavSave id=D_IONavSave tabIndex=8 height=20
src='owc://GIF/#11214' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavUndo id=D_IONavUndo tabIndex=9 height=20
src='owc://GIF/#11212' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavSortAsc id=D_IONavSortAscending tabIndex=10
height=20 src='owc://GIF/#11216' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavSortDesc id=D_IONavSortDescending tabIndex=11
height=20 src='owc://GIF/#11218' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavFilter id=D_IONavFilterBySelection tabIndex=12
height=20 src='owc://GIF/#11220' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavToggleFilter id=D_IONavFilterToggle tabIndex=13
height=20 src='owc://GIF/#11222' width=20></TD>"
writePretty "<TD class=MsoNavButton style='WIDTH: 20px; HEIGHT:
20px'><IMG class=MsoNavHelp id=D_IONavHelp tabIndex=14 height=20
src='owc://GIF/#11224' width=20></TD>"
writePretty "</TR></TBODY>"
End Sub
'----------------------------------------------------
Sub writeFormHeader(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFormHeader-->" & CHR(13) &
CHR(10)
End Sub
'----------------------------------------------------
Sub writeFormFooter(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFormFooter-->" & CHR(13) &
CHR(10)
End Sub
'----------------------------------------------------
Sub writeHeader(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeHeader-->" & CHR(13) &
CHR(10)
End Sub
'----------------------------------------------------
Sub writeFooter(DAPID)
writePretty CHR(13) & CHR(10) & "<!-- writeFooter-->" & CHR(13) &
CHR(10)
End Sub
'-----------------------------------------------------
Sub WritePretty(S_IN)
S_IN = replace(S_IN, "<", vbcrlf & "<")
response.write S_IN
End Sub
'-----------------------------------------------------
Sub WriteUrl(S_URL)
dim fso
dim text
dim readfile
dim contents
set fso = Server.CreateObject("Scripting.FileSystemObject")
set readfile = fso.OpenTextFile(S_URL, 1, false)
Response.Write readfile.ReadAll
readfile.close
Set fso = nothing
Set text = nothing
Set readfile = nothing
Set contents = nothing
End Sub
'-----------------------------------------------------
Sub WriteStandard0Filter(BO_Filter, CO_Filter, table)
'troubleshooting, printing HTML comment with all pertinent variables
response.write "<!-- " & vbcrlf
response.write "IsController = " & Session("IsController") & vbcrlf
response.write "IsBusinessOwner = " & Session("IsBusinessOwner") &
vbcrlf
response.write "Filter1 = " & Session("Filter1") & vbcrlf
response.write "Filter2 = " & Session("Filter2") & vbcrlf
response.write "BO_Filter = " & BO_Filter & vbcrlf
response.write "CO_Filter = " & CO_Filter & vbcrlf
response.write "table " & table & vbcrlf
response.write " -->" & vbcrlf
Dim ServerFilter
Dim IsController
'handle when someone is a controller; but they dont have any
ProfitCenters assigned.
'this would only happen when someone is a controller but doesnt have
any PC assigned.
'this testCase is currently assigned to Brian and JohnR.
IsController = Session("IsController")
If CO_Filter = 1 AND Len(Trim(Session("Filter1"))) < 6 then
response.write "<!-- Filter1 less than 6 chars; pretending that we're
not a controller (for this procedure) -->" & vbcrlf
IsController = 0
End If
'we dont need to check if someone is a controller; since this should be
secure either way
'utilizing OnlyController for permissions
If CO_Filter = 1 then
ServerFilter = Session("Filter1")
If BO_Filter = 1 then
ServerFilter = ServerFilter & " OR " & Session("Filter2")
End If
Else
If BO_Filter = 1 then
ServerFilter = Session("Filter2")
End If
End If
If Len(trim(ServerFilter)) < 5 then ServerFilter = "1 = 0"
Response.write "<!--"
Response.write "<ServerFilter>" & vbcrlf
Response.write ServerFilter & vbcrlf
Response.write "</ServerFilter>" & vbcrlf
Response.write "-->"
response.write vbcrlf
Response.write "<SCRIPT language='vbscript'>" & vbcrlf
Response.write "Sub StandardOFilter()" & vbcrlf
Response.write " document.all(" & Chr(34) & "MSODSC" & Chr(34) &
").RecordsetDefs(" & Chr(34) & table & Chr(34) & ").ServerFilter = " &
Chr(34) & ServerFilter & Chr(34) & vbcrlf
Response.write "End Sub " & vbcrlf
Response.write "Sub Window_onLoad()" & vbcrlf
Response.write " StandardOFilter" & vbcrlf
Response.write "End Sub " & vbcrlf
Response.write "</SCRIPT>" & vbcrlf
End Sub
'-------------------------------------------------------
Sub Write0Filter(BO_Filter, CO_Filter, table)
'troubleshooting, printing HTML comment with all pertinent variables
response.write "<!-- " & vbcrlf
response.write "IsController = " & Session("IsController") & vbcrlf
response.write "IsBusinessOwner = " & Session("IsBusinessOwner") &
vbcrlf
response.write "BO_Filter = " & BO_Filter & vbcrlf
response.write "CO_Filter = " & CO_Filter & vbcrlf
response.write "table " & table & vbcrlf
response.write " -->" & vbcrlf
Dim ServerFilter
If CO_Filter = 1 then
ServerFilter = "USERALIAS = '" & Session("pAlias") & "'"
If BO_Filter = 1 then
ServerFilter = ServerFilter & " OR USERALIAS = '" & Session("pAlias")
& "'"
End If
Else
If BO_Filter = 1 then
ServerFilter = "USERALIAS = '" & Session("pAlias") & "'"
End If
End If
If Len(trim(ServerFilter)) < 5 then ServerFilter = "1 = 0"
Response.write "<!--"
Response.write "<ServerFilter>" & vbcrlf
Response.write ServerFilter & vbcrlf
Response.write "</ServerFilter>" & vbcrlf
Response.write "-->"
response.write vbcrlf
Response.write "<SCRIPT language='vbscript'>" & vbcrlf
Response.write "Sub StandardOFilter()" & vbcrlf
Response.write " document.all(" & Chr(34) & "MSODSC" & Chr(34) &
").RecordsetDefs(" & Chr(34) & table & Chr(34) & ").ServerFilter = " &
Chr(34) & ServerFilter & Chr(34) & vbcrlf
Response.write "End Sub " & vbcrlf
Response.write "Sub Window_onLoad()" & vbcrlf
Response.write " StandardOFilter" & vbcrlf
Response.write "End Sub " & vbcrlf
Response.write "</SCRIPT>" & vbcrlf
End Sub
%>
also
<%
Call OnlyController
Call WriteDap(17)
Call Write0Filter(0, 1, "D_USER")
%>