Search found 6 matches

by erical12
Wed May 06, 2015 7:56 pm
Forum: Databases
Topic: SQLite - connection error
Replies: 12
Views: 7931

Re: SQLite - connection error

Here is a great resource; http://www.w3schools.com/sql/default.asp From that, this works SELECT * FROM Customers WHERE CustomerID=1; But you have to have a unique element in the row. The example table looks like CustomerID CustomerName ContactName Address City PostalCode Country Where the CustomerI...
by erical12
Mon May 04, 2015 8:47 pm
Forum: Databases
Topic: SQLite - connection error
Replies: 12
Views: 7931

Re: SQLite - connection error

Simon wrote:That says gName is empty.
Check it in the variable watcher.

Simon
Edit; Remember that gName must be declared as a global everywhere it is used.
I got it to work! Thank you so much for your help! Is there any chance you know how to return a row of data from SQLite? Instead of a column?
by erical12
Mon May 04, 2015 8:22 pm
Forum: Databases
Topic: SQLite - connection error
Replies: 12
Views: 7931

Re: SQLite - connection error

Hi Erica, You see how tName (gName) is outside of the quotes? Has to be. Simon Hi Simon, gName is outside of the quotes: put "SELECT * FROM ingredients where name =" && gName & ";" into tSQLQuery put revDataFromQuery(tab,return,gDatabaseID,tSQLQuery) into field "Outcome" When I breakpointed that li...
by erical12
Sat May 02, 2015 5:09 am
Forum: Databases
Topic: SQLite - connection error
Replies: 12
Views: 7931

Re: SQLite - connection error

Hi erical12, Try this; put "SELECT * FROM ingredients where name =" && tName & ";" into tSQLQuery And double check your location on mouseUp answer file "Select your DB" put it end mouseUp Simon Edit... sorry missed your last question I use the same connection as you have except I have spaces betwee...
by erical12
Fri May 01, 2015 5:51 pm
Forum: Databases
Topic: SQLite - connection error
Replies: 12
Views: 7931

Re: SQLite - connection error

HA, WAIT! It should read: specialFolderPath(" Documents ") With a trailing S ! Looks like this could be it :D My problem is that tDatabaseID is not a number--I fixed "Documents" and relocated my variables. I wrote an if statement to test if tDatabase was a number, and it's not... How do I fix that?
by erical12
Fri May 01, 2015 5:19 am
Forum: Databases
Topic: SQLite - connection error
Replies: 12
Views: 7931

SQLite - connection error

I've been struggling to get my database to connect to a SQLite database I have. I have my specialFolderPath and I put it into a variable but when I look under the variables tab, tDatabasePath is empty. Why is it empty? I'm still relatively new to LiveCode so I might be missing something big. When I ...