Page 1 of 1

More Lesson 3 Help Needed

Posted: Mon Oct 14, 2013 12:12 pm
by Pip
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?

Re: More Lesson 3 Help Needed

Posted: Thu Oct 17, 2013 10:58 pm
by LCNeil
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
--

Re: More Lesson 3 Help Needed

Posted: Sat Oct 19, 2013 1:09 pm
by Pip
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

Re: More Lesson 3 Help Needed

Posted: Sat Oct 19, 2013 6:03 pm
by Simon
Hi Pip,
zip your stack up first :)

Simon

Re: More Lesson 3 Help Needed

Posted: Mon Oct 21, 2013 11:14 am
by Pip
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

Re: More Lesson 3 Help Needed

Posted: Mon Oct 21, 2013 1:31 pm
by LCNeil
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
--

Re: More Lesson 3 Help Needed

Posted: Mon Nov 04, 2013 1:11 pm
by Pip
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.

Re: More Lesson 3 Help Needed

Posted: Fri Apr 25, 2014 3:25 am
by willdee76
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 158 times

Re: More Lesson 3 Help Needed

Posted: Fri Apr 25, 2014 12:23 pm
by LCNeil
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
——

Re: More Lesson 3 Help Needed

Posted: Fri Apr 25, 2014 9:56 pm
by willdee76
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

Re: More Lesson 3 Help Needed

Posted: Wed Apr 30, 2014 7:23 pm
by willdee76
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 166 times
:|

Re: More Lesson 3 Help Needed

Posted: Tue May 13, 2014 12:31 pm
by LCNeil
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
——