How to get StringForColumnIndex FMDB swift

54 views
Skip to first unread message

ana...@jkltech.in

unread,
Oct 6, 2015, 12:19:11 PM10/6/15
to FMDB
Hi ,

  I am Using Swift and fmdb for my project , i want to get values from a column values for db, am using the following code for geting the valules from db

var name = rs.StringforColumnIdex(1).

am getting following exception:

unexpectedly found nil while unwrapping an Optional value


but i have values in the table

Scott Brown

unread,
May 20, 2016, 3:57:34 PM5/20/16
to FMDB
Oh I just realized you're asking something different from what I wanted to know but I think the answer to your problem is you may have it saved as a string.  So it should be var name = rs.StringforColumnIdex("1") <---------- the difference being the quotations around the 1.  Hope that helps.
Reply all
Reply to author
Forward
0 new messages