More Lesson 3 Help Needed

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

More Lesson 3 Help Needed

Postby Pip » Mon Oct 14, 2013 12:12 pm

Got side tracked with another project & still working through lesson 3

Everything is working & I can run the app in LC but when I go to test it in the Simulator everything looks fine, but only the "Direct MySQL" & "Web MySQL" database with the two Veronicas displays

When I click the "SQLite" button the database is still displaying two Veronicas, any tips?

Just been trying to figure this out & discovered that if I am in LC & the SQLite database is displaying just prior to setting the standalone settings, then, when the app is loaded in the simulator, the SQLite database is displayed, them I can click the Direct MySQL or the Web MySQL & the database changes but when I click back on the SQLite button the database is still showing the database with the two Veronicas in it?
Pip
 
Posts: 47
Joined: Mon Jun 17, 2013 2:13 pm
Location: Perth, Western Australia

Re: More Lesson 3 Help Needed

Postby LCNeil » Thu Oct 17, 2013 10:58 pm

Hi Pip,

Could you post your stack here for us to have a look at? It will be easier to track down what could be causing the issue when we can see what is going on in your stack.

Kind Regards,

Neil Roger

--
RunRev Support Team ~ http://www.runrev.com
--
LCNeil
Livecode Staff Member
Livecode Staff Member
 
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: More Lesson 3 Help Needed

Postby Pip » Sat Oct 19, 2013 1:09 pm

Thanks Neil

Tried to post the stack as an attachment but got a message saying "The extension live code is not allowed"

Is there another way to post the stack?
Pip
Pip
 
Posts: 47
Joined: Mon Jun 17, 2013 2:13 pm
Location: Perth, Western Australia

Re: More Lesson 3 Help Needed

Postby Simon » Sat Oct 19, 2013 6:03 pm

Hi Pip,
zip your stack up first :)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3900
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: More Lesson 3 Help Needed

Postby Pip » Mon Oct 21, 2013 11:14 am

OK, have attached stack

Also continued to work thru lesson 3 & added the search code but now get the below error when connecting to the database. Can't understand why as didn't think I had touch the code for the database type.

group "databaseType": execution error at line 4 (Handler: can't find handler) near "databaseConnect", char 1

Pip
Attachments
SummerSchoolApp.livecode.zip
(175.67 KiB) Downloaded 104 times
Pip
 
Posts: 47
Joined: Mon Jun 17, 2013 2:13 pm
Location: Perth, Western Australia

Re: More Lesson 3 Help Needed

Postby LCNeil » Mon Oct 21, 2013 1:31 pm

Hi Pip,

It looks like you had a few typos in your database search handler, and as this was causing an error when the stack is launched, it looks like it had an effect on your databaseConnect handler.

What you had in your search handler was -

Code: Select all
put "WHERE firstname LIKE "%" & tSearchText & "%" OR lastname LIKE "%" & tSearchText & "%"" after tSQLQuery


where it should be-


Code: Select all
put " WHERE firstname LIKE '%" & tSearchText & "%' OR lastname LIKE '%" & tSearchText & "%'" after tSQLQuery


Although this looks almost identical, please keep an eye out for single quote usage when generating your SQL statement (e.g after the %)

Although this is not directly linked to your initial question, it may inadvertently provide a solution. Please keep us informed on how you get on.

Kind Regards,

Neil Roger

--
RunRev Support Team ~ http://www.runrev.com
--
LCNeil
Livecode Staff Member
Livecode Staff Member
 
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: More Lesson 3 Help Needed

Postby Pip » Mon Nov 04, 2013 1:11 pm

Thanks Neil

May need to look at getting a bigger screen, I could not see that there were both single ' and double " in the query.

The search is now working but I'm still left with the original problem of the app not working in the simulator.

Everything is working in LC but when I go to test it in the Simulator everything looks fine, but only the "Direct MySQL" & "Web MySQL" database with the two Veronicas displays, when I click the SQLite, the two Veronicas are still on display.
Attachments
SummerSchoolApp.livecode 2.zip
(175.5 KiB) Downloaded 98 times
Pip
 
Posts: 47
Joined: Mon Jun 17, 2013 2:13 pm
Location: Perth, Western Australia

Re: More Lesson 3 Help Needed

Postby willdee76 » Fri Apr 25, 2014 3:25 am

Hoping someone can take a look at my stack and help me sort it out. Got past the SQLite part successfully but stuck on the Direct MySQL part.
LivecodeDirectmysql.PNG
error screen

LCSS_Lesson1Complete.zip
Current Stack
(165.69 KiB) Downloaded 75 times
willdee76
 
Posts: 3
Joined: Fri Apr 25, 2014 3:09 am

Re: More Lesson 3 Help Needed

Postby LCNeil » Fri Apr 25, 2014 12:23 pm

Hi willdee76,

I have tried out your stack and all is working from my end. Please see the below video that shows your stack working (with no changes) and stepping through your code.

The most likely reason for no database ID being returned is if there is no internet connection available to the LiveCode IDE. Please ensure no firewall are blocking internet traffic to LiveCode and that you have a valid internet connection when developing your app.

http://techsupport.on-rev.com/SS.mp4

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
LCNeil
Livecode Staff Member
Livecode Staff Member
 
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: More Lesson 3 Help Needed

Postby willdee76 » Fri Apr 25, 2014 9:56 pm

Much appreciated Neil, good lesson learned. I have a variety of networks to choose from here and I chose a different one and it worked perfectly. Thanks so much. Now I know I am not crazy, I compared the code with the lesson like ten times. Ha ha
willdee76
 
Posts: 3
Joined: Fri Apr 25, 2014 3:09 am

Re: More Lesson 3 Help Needed

Postby willdee76 » Wed Apr 30, 2014 7:23 pm

Wow I am back again. :shock: Went through the part where we set up the search function for each database type and now moved on to creating the new card and the navigation control for it. I think that the lessons are great and very detailed. I consider myself a above average learner. Livecode has a way of making me feel like a complete dolt every other step. Hopefully this is just a growing pain of a baby programmer. Well I am stuck on the part where clicking on the list in the field should display the alternative card. Instead I get this error.

revdberr.PNG
Error


Included my stack

LCSS_Lesson1Complete (2).zip
Stack up to this point
(174.46 KiB) Downloaded 77 times


:|
willdee76
 
Posts: 3
Joined: Fri Apr 25, 2014 3:09 am

Re: More Lesson 3 Help Needed

Postby LCNeil » Tue May 13, 2014 12:31 pm

Hi Willdee76,

Apologies for the delayed response.

I've had a look at your script and it seems you are missing a single quote from your SQL query. More speficically you have-

Code: Select all
put " WHERE contact_id='" & pContactID & "" after tSQLQuery


where it should be-

Code: Select all
put " WHERE contact_id='" & pContactID & "'" after tSQLQuery


After I made this change, the name details show within the contactDetails card

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
LCNeil
Livecode Staff Member
Livecode Staff Member
 
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm


Return to Summer School 2013

Who is online

Users browsing this forum: No registered users and 0 guests