Jscript in ASP - per Paradox mail message

Results 1 to 4 of 4

Thread: Jscript in ASP - per Paradox mail message

  1. #1
    Jeff F. Guest

    Default Jscript in ASP - per Paradox mail message

    I&#039ve begun to use Jscript on the server side due it it "object" qualities. However, I have found certain things that are not possible to do directly in Jscript. For instance, myRecordset.GetRows returns a multidimentional array which Jscript cannot handle. I&#039ve had to write a VBScript function to do the GetRows and pass the array back to a Jscript function to convert to a one-dimensional array. This has limited me in other ways (I won&#039t get into here!).<BR><BR>Jeff

  2. #2
    Join Date
    Dec 1969
    Posts
    35

    Default RE: Jscript in ASP - per Paradox mail message

    Well I can honestly say that I&#039ve never worked with that property before. Actually in experimenting with it a little this morning, I can&#039t seem to figure out the three things that the function needs to be passed. According to my compiler (InterDev 6.0) recordSet.getRows ([rows], [start], [fields]) is what needs to be passed right? Which are numeric, which text and what format is a little baffling becuase the book that I&#039m using as a reference doesn&#039t say anything about the property except that it exists. On another note, true JScript doesn&#039t support true multi-dimentional arrays, but it does support arrays of arrays. Meaning that the element of the parent array is an array itself.

  3. #3
    Jeff F. Guest

    Default RE: Jscript in ASP - per Paradox mail message

    myRecordset(intRows, bmkStart, strField or intFieldPos)<BR><BR>where bmk=bookmark. There are some bookmark contants for first, last and current record you can use but I don&#039t know where they&#039re defined. I usually don&#039t specify any parameters since I build the SQL statement specifically for use with GetRows.<BR><BR>Again GetRows returns a VBArray. You must convert to JScript such as in this Jscript function:<BR><BR>function jsGetPickListData(strSQL) {<BR> <BR> // Call VBScript function to perform query - returns array<BR> var arrVB = new VBArray(vbGetPickListData(strSQL));<BR> // Convert VB array to Javascript array and return to caller<BR> return(arrVB.toArray());<BR> <BR>}

  4. #4
    Join Date
    Dec 1969
    Posts
    35

    Default RE: Jscript in ASP - per Paradox mail message

    Okay I guess I have a couple of more questions for you. First what does the special SQL statement look like? Like I said I&#039ve never had to use this method before. Second, I guess I&#039m a little confused about your post in the first place. Are you asking me if there is a way to use the GetRows method in a way that only used JavaScript objects or just to point out that sometimes pure JavaScript won&#039t always work? In answer to the first question, I don&#039t really know I&#039ll have to play around with it some more before I can give you a difinitive answer. In answer to the second question, I&#039ll admit that there are some limitations to JavaScript, but then again there are limitations with every programming language. In either case you seem to have worked out a usable workaround to which I say "good job". If you want to talk about this further you can e-mail me at:<BR>wreaugh@atg.aum.edu


Posting Permissions

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