How are you verifying that the db only received one line from the
description?  using sqlite3.exe or some other tool, or AIR?

SQLite itself does not have issues with storing line breaks, but it's
possible the AIR wrapper is losing them somewhere or more likely it's a
display/formatting issue.

One thing to keep in mind is that the Flash Player has funky internal
representations of line breaks in strings.  I believe it uses '\r' whereas
windows uses '\r\n' and *nix uses '\n'.  I had to make some changes in
Fluorine to handle line breaks properly with AMF and .NET integration.  It
could be that the line break is in the db but the tool you're using to view
the data doesn't recognize it as a valid line break.

HTH,

Sam



On Wed, Mar 26, 2008 at 10:33 AM, Raymond Camden <[EMAIL PROTECTED]>
wrote:

> I've got an AIR app that does simple inserts into a SQLite db. The
> insert looks like so:
>
> var insStmt:SQLStatement = new SQLStatement();
> insStmt.sqlConnection = dbconnection;
> sql = "insert into hours(description,projectidfk,clientidfk,hours,date)
> values(:description,:projectidfk,:clientidfk,:hours,:date)";
> insStmt.parameters[":description"] = descriptionfield.text;
> insStmt.parameters[":projectidfk"] = projectfield.selectedItem.id;
> insStmt.parameters[":clientidfk"] = projectfield.selectedItem.clientid;
>
> insStmt.parameters[":hours"] = hoursworkedfield.value;
> insStmt.parameters[":date"] = dateworkedfield.selectedDate;
>
> trace('desc is '+descriptionfield.text);
> insStmt.text = sql;
> insStmt.addEventListener(SQLEvent.RESULT, refreshHandler);
>
>
> Notice I'm using bound parameters for all my values. The description
> field is a text box. When I enter text with line breaks in it, the db
> only gets line one of description.
>
> Any ideas why? A string is a string even if it has line breaks in it -
> afaik.
>
>
> --
>
> ===========================================================================
> Raymond Camden, Owner of Camden Media, Inc.
>
> Email    : [EMAIL PROTECTED]
> Blog     : www.coldfusionjedi.com
> AOL IM   : cfjedimaster
>
> "My ally is the Force, and a powerful ally it is." - Yoda
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
-----------------------------------------------------------------
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer.
Position is in the Washington D.C. metro area. Contact
[EMAIL PROTECTED]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to