Home » U++ Library support » U++ SQL » error in example/SQLApp [FIXED]
Re: error in example/SQLApp [message #13733 is a reply to message #13731] |
Fri, 25 January 2008 11:00   |
|
Thanks. And Sorry for my English.
Now (this time) I try to understand technique (or technology) of life with UPP and I have additional time to analize expamples.
I found this TOOL is interest and powerful.
And I found one more strange thing in this example.
File borrow.cpp, lines from 14 to 27 - Function
Value DateIntConvertCls::Scan(const Value& text) const
{
String txt = text;
if(IsNull(txt))
return Null;
Date d;
if(StrToDate(d, txt)) {
const char *s = txt;
while(*s == ' ') s++;
if(*s == '\0')
return d - Date(1970, 1, 1);
}
return ErrorValue("Invalid date!");
}
I add there one string return d - Date(1970, 1, 1);.
Value DateIntConvertCls::Scan(const Value& text) const
{
String txt = text;
if(IsNull(txt))
return Null;
Date d;
if(StrToDate(d, txt)) {
const char *s = txt;
while(*s == ' ') s++;
if(*s == '\0')
return d - Date(1970, 1, 1);
}
return d - Date(1970, 1, 1);
// ^^^^^^^^^^^^^^^^^^^^^^^^^
return ErrorValue("Invalid date!");
}
Without this string, I can't to edit Date fields, when I add borrow records. I can add only empty dates.
This may be my mistake or mistake of program.
SQLApp - is a complex example, because many of newbies see to this application and this application is face of system.
And this app must be a exapmle of stability ( ).
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
[Updated on: Fri, 25 January 2008 18:46] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Jul 18 07:19:04 CEST 2025
Total time taken to generate the page: 0.04293 seconds
|