Results 1 to 2 of 2

Thread: Steve

  1. #1
    Join Date
    Dec 1969

    Default Steve

    My overall objective is to add a search function <BR>button that works together with the existing navigation <BR>DTC button. Within my rsmaster recordset DTC is an SQL <BR>statement - "SELECT * from bnmast ORDER BY bin". <BR>I don&#039;t want the search button to use an alternate SELECT statement (i.e. SELECT * from bnmast WHERE bin = mfind) <BR>that will affect the navigational button. I want to know <BR>how to use the following DO WHILE loop for other processes <BR>once this problem is solved. (I&#039;m a Foxpro programmer learning <BR>how work in the web application world) <BR>My specific objective is to use the field value in memvar "mfind" to seek a record. <BR>Once found, the Do While loop will cease and return. <BR>I&#039;m using Viusal Interdev to create ASP pages. Please give me <BR>an idea of what I should use as reference <BR>to the field data value in line #5. I tried rsmaster.Fields("bin") & rsmaster.bin with <BR>no luck. <BR><BR>1. &#060;SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server&#062; <BR>2. Sub btnFind_onclick()<BR>3. mfind = Listbox1.getValue() &#039; This provides/gets the proper field looup data I need.<BR>4. rsmaster.moveFirst<BR>5. do while rsmaster("bin") &#060;&#062; mfind &#039; This is where my problem is. Reference to the field data.<BR>6. rsmaster.moveNext<BR>7. loop<BR>8. End Sub <BR>9. &#060;/SCRIPT&#062; <BR><BR>Is there someone out there that can help me? <BR><BR><BR>Steve Gallego <BR><BR><BR>

  2. #2 Guest

    Default You are mixing up the client and server sides!

    The Scriptlet that you show is a server-side subroutine as specified by "RUNAT=Server". However the subroutine "btnFind_onclick" seems to be a client-side routine designed to do something when a browser button is clicked.<BR><BR>Also interaction with the recordset would ocurr on the server side only. So this could not work.<BR><BR>I think that your problem is caused by working with DTC. I tried it when I first started and quickly decided to give it a miss. I realise that maybe those things might make the job of programming a web site a little easier if I took the time to understand them, but if you work with the script you have much more control. The DTC&#039;s seem to me to blur the difference between the client and the server. You would probably do well to understand the workings of ASP and VBS before you use DTC&#039;s.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts