Re: TSQDataSet........
Kenneth Wilcox <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.kylix |
|---|---|
| Message-ID | <[email protected]> |
I'm not sure what you mean by "Everything that 'touches' the value of the
field will crash the app.
But have you tried something like this
if not SQL1.fieldbyname('author').isnull then
s := SQL1.fieldbyname('author').asstring
else
s := '';
I haven't tried this in Kylix yet, but I know this has helped me before in
Delphi.
Ken
At 11:08 PM 06/20/02 +0000, you wrote:
>Hi,
>
>i'm writing an CGI-App with a databaselink. There is TSQLConnection
>and a TSQLDataset in my Webmodule. I need read-only access to that
>MySQL-DB, so i'm using an unidrectional Dataset (much faster, that
>DataSet isn't caching all the result of a query). When i want to
>read the result of my query, I'm using that standard
>"while-SQL1.eof=false-<DO-SOMETHING>-SQL1.Next-end;"-algorithm.
>Everythings works fine, until the field i want to read conatins an
>empty string (''). That causes the program to crash. When i want to
>get the value of the field, i'm using something like this:
>
>.....
>var s:string;
>.....
>.....
> s:=SQL1.fieldbyname('author').asstring;// <-- That causes the
>crash (segmentation fault (SIGDEV(11))
>.....
>
>
>I tried to "watch" for empty strings in that field, but everything
>that "touches" the value of the field will crash the app.
>
>Any ideas?
>
>Thanks for your response,
>
>Henock
>
>
>
>
>
>-------------------------------------------------------
>Forum / mailing list for Borland Kylix programmers
>Our web page: http://groups.yahoo.com/group/kylixgroup
>To join the forum: [email protected]
>To unsubscribe: [email protected]
>To post your messages: [email protected]
>To contact the moderator: [email protected]
>-------------------------------------------------------
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/