Re: Some Foolish questions
On 10/20/05 3:04 PM, "Fred Giannetto" <[EMAIL PROTECTED]> wrote: > Hello Sir, > > You stated previously > >> You should be able to use 'revDB_moveprev' in order to move back one record >> at a time. Rather than using a cursor (recordset), it may be more efficient >> (if there's not a ton of data) to retrieve all the data at once into a >> variable (or array) and then walk though that. If you need help in doing >> this, please let us know > > Please advise me on how you would setup the array or variable and be able to > walk through it (there is not a ton of data). Well, you'd use 'revdb_querylist' to retrieve your data, like: put "SELECT * FROM Entities" into tQuery put revdb_queryList("","",tDBRef,tQuery) into tData and now tData has every record in the Entities table, where each line is a record, and each field is tab-delimited. So suppose I had three records in the Entities table, and three fields in the table (First, Last, Phone)... tData might look like this (-> means 'tab'): Ken -> Ray -> 555-1212 John -> Smith -> 555-1313 Harry -> Gruber -> 555-1414 So you could use normal repeat loops, etc. to go through this to get what you need, or do lineOffset() to search for the proper line, like this: put lineOffset("Ken" & tab,tData) into tLine if tLine <> 0 then set the itemDel to tab put item 2 of line tLine of tData into tLastName put item 3 of line tLine of tData into tPhone end if answer tLastName,tPhone --> Answers "Ray,555-1212" If you wanted to take the data and put it into an array, that's a bit more difficult because the simple act of "split" will cause the first item of each line to be the 'key', so if you did: split tData with return and tab You'd have this: tData["Ken"] --> "Ray,555-1212" So that may not work very well for you without a lot of manipulation to get it right. So perhaps just sticking with a tab-and-return-delimited chunk of data (what you get back from revdb_queryList) would be best. HTH, Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Some Foolish questions
Hello Sir, You stated previously You should be able to use 'revDB_moveprev' in order to move back one record at a time. Rather than using a cursor (recordset), it may be more efficient (if there's not a ton of data) to retrieve all the data at once into a variable (or array) and then walk though that. If you need help in doing this, please let us know Please advise me on how you would setup the array or variable and be able to walk through it (there is not a ton of data). Thank you All best Always Fred ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Some Foolish questions
Fred- Tuesday, October 4, 2005, 1:42:23 PM, you wrote: > 2) When I hit the previous button the record stays on the current record. I > can go forward successfully, hit previous button (nothing happens), and then > go forward again successfully. I can only get to the first entry again by > refreshing the SQL. I am using the button exactly as it is shown in the > video example. The "move to previous record" and other such functions simply don't work with ODBC connections. Cast some votes for bug #1528 if you think it's important to get fixed. ODBC connections are created in a forward-only mode. Tuviah weaseled out of this one by saying "I believe the docs document that certain ops don't work with certain databases". -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Some Foolish questions
Hello, 1) I switched to -tShortfall because I was not seeing a negative value. The result is the same whether I have -tShortfall or tShortfall. Do you get negative values to appear in your fields? 2) When I hit the previous button the record stays on the current record. I can go forward successfully, hit previous button (nothing happens), and then go forward again successfully. I can only get to the first entry again by refreshing the SQL. I am using the button exactly as it is shown in the video example. Thank you All best Always Fred From: Ken Ray <[EMAIL PROTECTED]> Reply-To: How to use Revolution To: Use Revolution List Subject: Re: Some Foolish questions Date: Tue, 04 Oct 2005 15:26:19 -0500 On 10/4/05 3:10 PM, "Fred Giannetto" <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > 1) Absolute value question. Here is a copy of the script. > I want input values over 10 to create a deficit in the Consumer and Foreign > fields. Example, a user puts 15 into the Reserves field. It is subtracted > from 20 putting the remainder into tReserves. tReserves is less then 10 so > it has 10 subtracted from it, it is divided by 2 resulting in -2.5 into > tConsumer but I only see 2.5. Well, the script puts 'tShortfall / 2 into tConsumer', which would put -2.5 into tConsumer, but when it goes into the field, you have 'put -tConsumer into field "Consumer"', which puts "2.5" into fld "Consumer" because: -tConsumer is the same as -1 * tConsumer which is: -1 * -2.5 = 2.5 So I think if you set it to put "tConsumer" instead of "-tConsumer" you should get what you're expecting. > 2. I am using the database property "move to previous record" for the > previous record button and it is setup to access the correct query. I have > created two queries using Microsoft Access driver and Microsoft do Access > driver. I have attempted to connect with both of them and they exhibit the > same symptoms. I can only go forward and refresh. The MySQL connection > works without any problems. What happens when you try to go to the previous record what happens - do you stay on the current one? Or do you get some other result? Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Some Foolish questions
On 10/4/05 3:10 PM, "Fred Giannetto" <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > 1) Absolute value question. Here is a copy of the script. > I want input values over 10 to create a deficit in the Consumer and Foreign > fields. Example, a user puts 15 into the Reserves field. It is subtracted > from 20 putting the remainder into tReserves. tReserves is less then 10 so > it has 10 subtracted from it, it is divided by 2 resulting in -2.5 into > tConsumer but I only see 2.5. Well, the script puts 'tShortfall / 2 into tConsumer', which would put -2.5 into tConsumer, but when it goes into the field, you have 'put -tConsumer into field "Consumer"', which puts "2.5" into fld "Consumer" because: -tConsumer is the same as -1 * tConsumer which is: -1 * -2.5 = 2.5 So I think if you set it to put "tConsumer" instead of "-tConsumer" you should get what you're expecting. > 2. I am using the database property "move to previous record" for the > previous record button and it is setup to access the correct query. I have > created two queries using Microsoft Access driver and Microsoft do Access > driver. I have attempted to connect with both of them and they exhibit the > same symptoms. I can only go forward and refresh. The MySQL connection > works without any problems. What happens when you try to go to the previous record what happens - do you stay on the current one? Or do you get some other result? Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Some Foolish questions
Hello Everyone, 1) Absolute value question. Here is a copy of the script. I want input values over 10 to create a deficit in the Consumer and Foreign fields. Example, a user puts 15 into the Reserves field. It is subtracted from 20 putting the remainder into tReserves. tReserves is less then 10 so it has 10 subtracted from it, it is divided by 2 resulting in -2.5 into tConsumer but I only see 2.5. The script is a little convoluted because I have been trying to solve this problem. on mouseUp put 20 - field "Reserves" into tReserves switch case tReserves < 10 put tReserves - 10 into tShortfall put tShortfall / 2 into tConsumer put -tConsumer into field "Consumer" put tShortfall / 2 into tForeign put -tForeign into field "Foreign" put field "Reserves" into field "Military" case tReserves >= 10 put tReserves / 2 into field "Consumer" put tReserves / 2 into field "Foreign" put field "Reserves" into field "Military" end switch end mouseUp 2. I am using the database property "move to previous record" for the previous record button and it is setup to access the correct query. I have created two queries using Microsoft Access driver and Microsoft do Access driver. I have attempted to connect with both of them and they exhibit the same symptoms. I can only go forward and refresh. The MySQL connection works without any problems. If there are no foolish questions then I am sure I will at least breach the perimeter of the inane. Thank you for your assistance All best Always Fred From: Ken Ray <[EMAIL PROTECTED]> Reply-To: How to use Revolution To: Use Revolution List Subject: Re: Some Foolish questions Date: Thu, 29 Sep 2005 20:47:03 -0500 On 9/29/05 7:12 PM, "Fred Giannetto" <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I am evaluating the software and have a couple of foolish questions. Welcome, Fred! No questions are foolish! > 1) It seems the fields are only returning absolute value. The script is > performing the math correctly but the field returns all negative values as > absolute values. Is there a setting or a way around this? Well, without knowing what the script is that is executing, it would be hard to give you an answer. Can you post the script you're executing? > 2) I have connected to my Access database and results are returned. I am > unable to go back to previous records however. I can only go to the next > record or refresh the query. Is this a limitation in a library and what is > the way around it? I believe I saw another post suggesting an array be > used. You should be able to use 'revDB_moveprev' in order to move back one record at a time. Rather than using a cursor (recordset), it may be more efficient (if there's not a ton of data) to retrieve all the data at once into a variable (or array) and then walk though that. If you need help in doing this, please let us know. Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Some Foolish questions
Ken- Thursday, September 29, 2005, 6:47:03 PM, you wrote: > You should be able to use 'revDB_moveprev' in order to move back one record No. The ODBC functions are implemented as a forward-only snapshot. Random access to database records is not available. And copying into an array is not a viable option except for very small databases because of the tremendous amount of disk thrashing involved. My take is that a new ODBC connection is opened and closed for each record retrieval. Yes, it's been BZed. -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Some Foolish questions
On 9/29/05 7:12 PM, "Fred Giannetto" <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I am evaluating the software and have a couple of foolish questions. Welcome, Fred! No questions are foolish! > 1) It seems the fields are only returning absolute value. The script is > performing the math correctly but the field returns all negative values as > absolute values. Is there a setting or a way around this? Well, without knowing what the script is that is executing, it would be hard to give you an answer. Can you post the script you're executing? > 2) I have connected to my Access database and results are returned. I am > unable to go back to previous records however. I can only go to the next > record or refresh the query. Is this a limitation in a library and what is > the way around it? I believe I saw another post suggesting an array be > used. You should be able to use 'revDB_moveprev' in order to move back one record at a time. Rather than using a cursor (recordset), it may be more efficient (if there's not a ton of data) to retrieve all the data at once into a variable (or array) and then walk though that. If you need help in doing this, please let us know. Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution