EDbColDateTime insert sql

Login to reply to this topic.
Thu, 2005-07-14 16:15
Joined: 2005-02-18
Forum posts: 34
hi everybody

i got a problem with "EDbColDateTime", that is.... how can i insert a date in my table having a column type EDbColDateTime?

i'm trying with:

'01/01/1977'
'#01/01/1977#'
'01011977'
'#01011977#'

... have you any idea? i found no documentation about it!

thanks

stefano

Tue, 2005-07-19 10:16
Joined: 2005-02-18
Forum posts: 34
Re: EDbColDateTime insert sql
ok, fixed: the correct insert is #dd/mm/yyyy# without '

now i have another problem: how can i retrieve this information from the database? how can i READ this date?

thanks

Stefano
Tue, 2005-07-19 10:33
Joined: 2005-02-18
Forum posts: 34
Re: EDbColDateTime insert sql
i'm using this fragment of code:

TDbColNo colData=colSet->ColNo(KRiferimentoDataCol);
HBufC* bufData=HBufC::NewLC(view.ColLength(colData));
TInt lenData=view.ColLength(colData);
TPtr bufDataPtr=bufData->Des();
RDbColReadStream inData;
inData.OpenLC(view,colData);
TRAPD(err,inData.ReadL(bufDataPtr));
if (err==KErrEof) {}
inData.Close();
CleanupStack::PopAndDestroy();
CCknInfoDialog::RunDlgLD(_L("Data"),bufData->Des());
CleanupStack::PopAndDestroy(bufData);

but bufData is empty...

do you have any idea??

stefano
Fri, 2006-10-13 05:54
Joined: 2006-10-05
Forum posts: 80
Re: EDbColDateTime insert sql
Thank you so much sdurso, ur post has been of great help to me....

i was getting crazy with inserting a date in the database. But ur post has make my work so easy!!!! Smiley
  • Login to reply to this topic.