Problems with empty table view - iphone

im trying to write an app that will display a list off lines from a book e.g line 1, line 2 in a table view and you can then select a line to view the corrosponding text.
I've got to the stage where the text should at least appear in the table view(not as far as being able to select it), yet it remains empty.
I used the debugger and was able to find out that there are zero objects in the array used to determine the 'numberOfRowsInSection' and being as this returns zero I think this may explain the problem?
I have pasted up all my code and would really appreciate it if someone has time to skim through it. I know its a big thing to ask but I cant seem to pin point the problem myself.
RootViewController.h --> http://pastie.org/858561
RootViewController.m---> http://pastie.org/858562
BookTestAppDelegate.h ---> http://pastie.org/858566
BookTestAppDelegate.m---> http://pastie.org/858567
LineClass.h----> http://pastie.org/858568
LineClass.m ----> http://pastie.org/858570
SOURCE : http://uploading.com/files/9f5f1249/BookTest.zip/
Thanks guys,

Your sample sqlite database doesn't have table named "animals". But it has table "book". I think you should correct your readLinesFromDatabase method with following SQL statement: select * from book. ;-)

Related

how get data(postgresql) in datacamp workspace

i want to get the complete data but it says "truncated to 2222". My question is why can it be like that even though I don't use truncated statements. my code is like below:
SELECT *
FROM cinema.films;
and I also do another code that is more specific, the goal is that all lines can be downloaded
SELECT *
FROM cinema.films
LIMIT 4968;
the form of the table is more or less like this. look in the lower right corner, it says "truncated to 2222". how so that no data is truncated and I can get the data as a whole?
I've searched on google and on the stackoverflow forums. I hope that someone will help solve my problem

Why is Access Dlookup Formula Giving Compile Error

so here's my problem. The below works:
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder=331091")
Unfortunately I need 331091 to be Combo4. Once I change the formula to:
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder"= [Combo4]") or
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder"= Combo4) or
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","[WorkOrder]"= [Combo4])
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","[WorkOrder]= [Combo4]")
I've been testing all the variations in Immediate Window and all result in Compile error: Expected: expression. Getting the same error in my other database which is why I created this one. One table, one record along with one unbound form. Table has WorkOrder and CylindersCompleted which are both Number and the form has one Combo and one textbox which are both Number. I'm putting the Dlookup formula in the Control Source of the textbox. I'm hoping someone can help me solve this issue so I can apply it to my other database which is much more complicated. Thanks in advance.
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder"= [Combo4]")
Should be:
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder=" & [Combo4])

Issues with "QUERY(IMPORTRANGE)"

Here's my first question on this forum, though I've read through a lot of good answers here.
Can anyone tell me what I'm doing wrong with my attempt to do a query import from one sheet to a column in another?
Here's the formula I've tried, but all my adjustments still get me a parsing error.
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1yGPdI0eBRNltMQ3Wr8E2cw-wNlysZd-XY3mtAnEyLLY/edit#gid=163356401","Master Treatment Log (Responses)!V2:V")"WHERE Col8="'&B2&'")")
Note that importrange is only needed for imports between spreadsheets. If you only import from one sheet into another within the same spreadsheet I would suggest using filter() or query().
Assuming the value in B2 is actually a string (and not a number), you can try
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1yGPdI0eBRNltMQ3Wr8E2cw-wNlysZd-XY3mtAnEyLLY/edit#gid=163356401","Master Treatment Log (Responses)!V2:V"), "WHERE Col8="'&B2&'", 0)
Note the added comma before "WHERE". If you want to import a header row, change 0 to 1.
See if that helps? If not, please share a copy of your spreadsheet (sensitive data erased).

Error in Opening Report from Form

I have a Form which will help me to filter out the records I want for my Report. The button will open the Report On Click.
This is the code in the button:
Private Sub Open_OEE_Click()
DoCmd.OpenReport "OEE_Report", acViewReport, , , acWindowNormal
End Sub
I keep getting the error:
I also have placed the query in my report under the Record Source as:
SELECT * FROM 3_OEE WHERE ((([3_OEE].RecordID)=Forms![3_OEE_Report]!cboRecordID) And (([3_OEE].Date_Recorded)=DateValue(Forms![3_OEE_Report]!Date_Recorded)) And (([3_OEE].MC_No)=Forms![3_OEE_Report]!cboMCNo) And (([3_OEE].Product)=Forms![3_OEE_Report]!cboProduct));
I want to search based on one criteria (text box or combo box) and not all four at once.
Am I missing out something?
MS-Access does tend to go a bit overboard with the brackets. Make the report's Record Source a bit easier to read by trimming out the unnecessary ones. You also need to get your date criterion in the right format - Access always uses US formatting in SQL queries and needs # signs around the date:
SELECT * FROM 3_OEE
WHERE [3_OEE].RecordID = Forms![3_OEE_Report]!cboRecordID
And [3_OEE].Date_Recorded = Format(Forms![3_OEE_Report]!Date_Recorded, "\#mm/dd/yyyy\#")
And [3_OEE].MC_No = Forms![3_OEE_Report]!cboMCNo
And [3_OEE].Product = Forms![3_OEE_Report]!cboProduct;
I would also suggest creating a named query for this and setting the report's Record Source to the named query. You can then test the query in isolation without having to run the report (but make sure the Form is open and the relevant controls are populated).
I asked for help from another source.
Answer to Question

Workflow - Can not select right rows

I have created this workflow by copying a workflow(macro) I recorded from our company system in the hope to relieve me from heavy data entry work. However, when I play the workflow, it failed to select the right row on a list(grid). Instead, it always selects the first row no matter what row I designate. I don't know which programming language the system uses. It was saved using the .P extension. Here is a part that caused the problem. The third last sentence (SELECT_ROW("2")) was not properly executed.
SELECT_TAB("po-proc-tabpage-1").
SET_FIELD("scr-po-num","02.6430").
SELECT_TAB("NONE").
CHOOSE_BUTTON("button-edit").
CHOOSE_BUTTON("button-items").
GET_DIALOG("poitment.p","poitment-004").
SELECT_GRID("br-item").
RESET_GRID_SORT().
SELECT_ROW("2").
CHOOSE_BUTTON("badd-charges").
GET_DIALOG("poitmchg.p","poitmchg-004").
Thanks in advance for any comments.