Search found 28 matches

by Bellballer1
Wed Mar 23, 2016 2:38 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

Hi AxWald! I do have the proper lines in tData. I continuously check that tData contains the proper lines. I appreciate you taking a look! Really, all I'm trying to do is get different numbers into the markers on my map. For example, I want the 1st marker to be labeled "6", the 2nd marker should hav...
by Bellballer1
Mon Mar 21, 2016 9:00 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

Hi Pete!

I did change the SELECT statement. That part is working correctly.

I will send you everything to the email you provided. I very much appreciate you taking a look!
by Bellballer1
Mon Mar 21, 2016 3:48 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

Hi SparkOut! Thanks for taking a look. The addMarker handler is doing its job...it is putting the correct values into latitude, longitude, and title (using pPosition and pTitle). Additionally, I changed to "add 1 to tCounter" in "loadSelectedResult" and that did not change the results I am getting. ...
by Bellballer1
Mon Mar 21, 2016 2:34 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

Hi Pete! Thanks for the response...I really appreciate it. When I set the breakpoint, my tLocArray variables appear as they should. However, part of the problem is that its not updating (i.e. not reading line2, line3, etc.)...it is staying on line 1, so the only thing that appears in the markers is ...
by Bellballer1
Fri Mar 18, 2016 9:20 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

Here is the database schema: function databaseGetLocations put "SELECT Address, Latitude, Longitude, zIndex FROM Sites;" into tCreateListSQL put revDataFromQuery(tab,return,gDatabaseID,tCreateListSQL) into gLocationList return gLocationList end databaseGetLocations And here is the code that I use in...
by Bellballer1
Fri Mar 18, 2016 6:11 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

tData is right...I am getting the correct # of lines. I just added another record (now there are 3 records), and I got the same result...all my makers now have the zIndex from the 3rd line. I want: "var mrk_" = tLocArray[1]["zIndex"] "var mrk_1 = tLocArray[2]["zIndex"] "var mrk_2 = tLocArray[3]["zIn...
by Bellballer1
Fri Mar 18, 2016 5:26 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

Right, that's the part I don't understand either (getting the 4 results). I think it has to do with the counter and the repeat. Its giving me the result after the repeat, which in this case, is always going to be "tLocArray[2]["zIndex"]" since it is the last result when the counter ends.
by Bellballer1
Fri Mar 18, 2016 5:12 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

I can give modifying the "databaseGetLocations()" function. My database consists of 2 records, each line with a value for the "address, latitude, longitude, and zIndex." put databaseGetLocations() into tData put empty into tLocArray put 1 into tCounter set the itemDel to tab repeat for each line tLi...
by Bellballer1
Fri Mar 18, 2016 4:39 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

The records in the database are correct. The problem is that I'm getting 4 results returned, when I only want 2. I'm getting 2 results for each marker because I get 1 result for each line in my database. So this is how the results are being returned (function getMarkerCode): 1) "var mrk_" ## the zIn...
by Bellballer1
Fri Mar 18, 2016 4:05 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Re: Getting correct result from database using counter

Hi Klaus, I made the change you suggested, but I get the same result. I need to get a unique value, the "zIndex", for each of the records in my database...I'm currently getting 4 values (returned as "var mrk_", "var mrk_", "var mrk_1" , and "var mrk_1" because the value stored in tLocArray[2]["zInde...
by Bellballer1
Fri Mar 18, 2016 5:25 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2632

Getting correct result from database using counter

Hello all! The problem I am having is that the database I am using is being queried correctly, but the correct result is not being returned because of a counter. For example, for the 1st line of the record, I get returned 2 results..."var mrk_" which correctly contains item 4 of the 1st line of the ...
by Bellballer1
Fri Mar 11, 2016 3:50 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to have newly created database read into code
Replies: 11
Views: 1327

Re: How to have newly created database read into code

Klaus you are beautiful!! All of your tips have worked! The RECORDS in my database table are now being read properly (and it helps to speak the same "language"...sorry about that). Like you said in an earlier post, it all sounds logical when I see it. The 2nd part of my question from yesterday actua...
by Bellballer1
Thu Mar 10, 2016 1:30 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to have newly created database read into code
Replies: 11
Views: 1327

Re: How to have newly created database read into code

Hi Klaus! Thank you for everything! Your tips have worked, no surprises there! Now just 2 minor questions (smile). I have 2 lines of data in my database table, but right now only the first line is being read. Do I set the itemDel to "repeat", so that the next line from the table is read? Again, here...
by Bellballer1
Tue Mar 08, 2016 9:13 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to have newly created database read into code
Replies: 11
Views: 1327

Re: How to have newly created database read into code

Thanks Klaus! That is very logical! Whenever I find the right solution in LiveCode, it always seems easier than I made it out to be. I did throw in some error checks, and I now know that the correct data and values are being carried over properly (e.g. the proper values in tAddress, tLatitude, etc.)...
by Bellballer1
Tue Mar 08, 2016 6:43 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to have newly created database read into code
Replies: 11
Views: 1327

Re: How to have newly created database read into code

Hopefully this is my last question (smile). Per quailcreek's suggestions, I changed the header name to the following to get rid of the periods: function databaseGetLocations put "SELECT Address, Latitude, Longitude, zIndex FROM Sites;" into tSQLStatement put revDataFromQuery(tab,return,gDatabaseID,t...

Go to advanced search