Quantcast
Channel: LiveCode Forums
Viewing all articles
Browse latest Browse all 440

Getting Started with LiveCode - Complete Beginners • DATE filter using MS Access Database

$
0
0
Hi Everyone,

I'm trying to create an application that will display the records by entering the two DATES

but i'm having an error and it won't display the records.

I don't know if the DATE format is the problem or my code.

Image

CODE:

on mouseUp   DBConn   SearchDatesend mouseUplocal tDatabaseID,sDatabaseIDlocal tSQLcommand setDatabaseID pDatabaseID   put pDatabaseID into sDatabaseIDend setDatabaseIDfunction getDatabaseID   return sDatabaseIDend getDatabaseIDcommand DBConn   put revOpenDatabase("ODBC", "Wbox", "TempDB",, )into tDatabaseID   setDatabaseID tDatabaseID   end DBConnCommand SearchDates   put getDatabaseID() into tDatabaseID   put Field "Start Date" into tStartDate   put Field "End Date" into tEndDate   put "SELECT * FROM EODattr1 WHERE ACDate BETWEEN '"&tStartDate&"' AND '"&tEndDate&"';" into tSQL    put revDataFromQuery(tab,return,tDatabaseID,tSQL) into tList    set the dgData of group "dgEOD" to empty       repeat with x=1 to the number of lines of tList      set the itemdelimiter to tab      put item 1 of line x of tList into theDataA["A"]      put item 2 of line x of tList into theDataA["B"]      put item 3 of line x of tList into theDataA["C"]      put item 4 of line x of tList into theDataA["D"]      dispatch "AddData" to group "dgEOD" with theDataA,x   end repeatend SearchDates

hope you can help me
DateFilter.png

Statistics: Posted by lemodizon — Fri Aug 23, 2024 3:48 pm



Viewing all articles
Browse latest Browse all 440

Trending Articles