|
Anyone have ideas as to what could be wrong with the code and/or database? I could have sworn this has worked in the past, but I cant even get any result from a print statement in the Initialize section of a page, nor a form. Is there something in the database or server settings that could be causing it not to execute that code at all? Currently it is set to disallow anonymous access and it runs all agents as the web user. The following items also appear in the Domino server log: 07/31/2002 08:14:09 AM You are not authorized to perform this operation [/apps/saleswee.nsf/PrepareStatement] 07/31/2002 08:14:19 AM You are not authorized to perform this operation [/apps/expenses.nsf/ExpenseStatement?OpenForm&CLIB_20020731] They have only appeared once in the log, but I've attempted getting this working several times this morning. Any ideas? Thanks, Brian A. Cline G&P Trucking Company 800.922.1147 x6068 clib@gptruck.com clib@gptruck.com Sent by: To: domino400@midrange.com domino400-admin@mi cc: drange.com Subject: Re: Forms and Agents 07/29/2002 05:03 PM Please respond to domino400 So far, I have the following in the WebQueryOpen section of the form: @Command([ToolsRunMacro]; "PopulateFields") and the following code in the PopulateFields agent. On a side note, even if I remove all this code from Initialize and simply put a Print statement in there, it doesnt even show the text that I print. ----- Uselsx "*LSXODBC" Sub Initialize On Error Goto ErrorHandler Dim DBC As New ODBCCOnnection Dim DBQ As New ODBCQuery Dim DBR As New ODBCResultSet Set DBQ.Connection = DBC Set DBR.Query = DBQ Dim NS As New NotesSession Dim ND As NotesDocument Set ND = NS.DocumentContext Dim dbUser As String, dbPass As String, qStr As String, qDat As String, qUsr As String dbUser = "notesdb" dbPass = "notesdb" qStr = ND.Query_String(0) If Instr(qStr, "&") = 0 Then Print "<B>Invalid document identifier.</B>" Exit Sub End If qLen = Len(qStr) qPos = Instr(qStr, "&") qUsr = Mid(DocID, 1, qPos - 1) qUsr = Ucase(qUsr) qDat = Mid(DocID, qPos + 1, qLen - qPos) If Not DBC.ConnectTo("COLUMBIA", dbUser, dbPass) Then Print "<B>CRITICAL ERROR ENCOUNTERED while connecting to database:</B>" PrintDBErrors DBC, DBQ, DBR Exit Sub End If startDate = GetSunday( qDat ) endDate = GetSaturday( qDat ) DBQ.SQL = "SELECT * FROM ITSR5CSTM.SLSPLANPF WHERE SPUSER='" & qUsr & "' AND SPDAT >= " & startDate & " AND SPDAT <= " & endDate Print DBQ.SQL & "<P>" ErrorHandler: Print "Script error (initialize): " & Error & "<P>" Exit Sub End Sub ----- Any ideas? Thanks, Brian Cline G&P Trucking Company clib@gptruck.com 800.922.1147 _______________________________________________ This is the Lotus Domino on the iSeries / AS400 (DOMINO400) mailing list To post a message email: DOMINO400@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/domino400 or email: DOMINO400-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/domino400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.