Search found 72 matches

by Kevin
Sat Nov 07, 2009 9:17 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: File System
Replies: 2
Views: 467

Ah

Completely forgot about that construct thanks!
by Kevin
Sat Nov 07, 2009 6:01 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: File System
Replies: 2
Views: 467

File System

How do I check if a folder exists?
by Kevin
Sat Oct 31, 2009 3:31 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

The answer for those following...

on mouseUp
local _db
local _now

put revOpenDatabase("sqlite",,,,,,,) into _db
put revDataFromQuery(comma,return,_db,"SELECT datetime('now','utc');") into _now
revCloseDatabase _db

end mouseUp
by Kevin
Sat Oct 31, 2009 3:20 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

Miss the small things

put revDataFromQuery(comma,return,"SELECT datetime('now');") into _now

Forgot the handle to the database.
by Kevin
Sat Oct 31, 2009 3:05 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

Past example using deatetime() query still fails.

This is from the example (SQLite Sampler.rev) only altered the SQL. Can create tables and insert data. Just cannot see to execute any SQLite date time functions. on mouseUp local _db local _now put revOpenDatabase("sqlite","AppReg3.db",,,,,,) into _db put revDataFromQuery(comma,return,"SELECT dateti...
by Kevin
Sat Oct 31, 2009 2:08 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

Odd

Just found it odd. I am not aware of the functionality Runtime Revolution implements or does not. I have used many forums in the past and have have been given misleading advise just wanted to ensure we we speaking of the same thing.

Kevin
by Kevin
Fri Oct 30, 2009 11:28 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

Examples

As shown in the examples there is no file used it is in memory. Therefore no need for userid or password since I only have the handle.

Thanks,
Kevin
by Kevin
Fri Oct 30, 2009 11:26 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

Example RB Linux

Function LocalToUTC( ByVal As Date ) As Date Dim oDb As New REALSQLDatabase Dim iOffset As Integer Dim oError As New Date oError.TotalSeconds = 0 If False = oDb.Connect Then Dim eNoTimeService As New RuntimeException eNoTimeService.Message = "Missing SQL Time subsystem cannot initialize" Raise eNoTi...
by Kevin
Fri Oct 30, 2009 11:23 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

Example command line

C:\SQLite\sqlite-3_6_19>sqlite3.exe
SQLite version 3.6.19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> SELECT datetime('now' 'utc');
SQL error: near "'utc'": syntax error
sqlite> SELECT datetime('now','utc');
2009-10-31 03:22:24
sqlite>
by Kevin
Fri Oct 30, 2009 11:13 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

SQLite

I have used this exact same behavior in C++, C, REALBasic and several other languages!
by Kevin
Fri Oct 30, 2009 11:12 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

Sorry.

The SQLite creates a in memory only database when no file is specified. This is common with using the library.
by Kevin
Fri Oct 30, 2009 11:05 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

Transcript.

on mouseUp

local _db
local _now

--
--In memory only no database file needed here
--
put revOpenDatabase("sqlite",,,,,,,) into _db
put revDataFromQuery(comma,return,"SELECT datetime('now');") into _now
revCloseDatabase _db

end mouseUp
by Kevin
Fri Oct 30, 2009 9:29 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

SQLite output.

SQLite version 3.6.19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> SELECT datetime('now');
2009-10-30 20:26:17
sqlite> SELECT datetime('now', 'localtime');
2009-10-30 15:26:50
sqlite> SELECT strftime('%s','now','localtime');
1256916457
sqlite>
by Kevin
Fri Oct 30, 2009 9:09 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: SQLITE Query Successful command line faile RR
Replies: 15
Views: 1715

SQLITE Query Successful command line faile RR

This query is successful from the command line but fails with revdberr. Any suggestions?

SELECT strftime('%s','now','localtime');
by Kevin
Wed Oct 28, 2009 6:50 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Ramdom
Replies: 4
Views: 706

Ramdom

I am passing a unsigned 64 bit integer as the upper limit to random and receiving "(random: error in source expression), char 4"

put random(18446744073709551615) into _random

What is the max random can take?

Go to advanced search