ATL OLE DB 的一个具体问题

wizz 2004-01-26 03:39:22
用ATL模板向导生成的代码访问OLE DB,其他都没有问题,但是它把timestamp绑定成了DBTIMESTAMP,我不知道怎么用这种类型,关键是我insert的时候需要用NOW()函数啊,怎么实现?谢谢。
...全文
29 点赞 收藏 6
写回复
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
sohou 2004-08-17
你插入的时候用VARIANT类型插没问题的。
回复
bigwasp 2004-08-15
//也可改成 DATE 类型,如下:
struct Cxxx
{
DATE m_tTime; //时间

BEGIN_PARAM_MAP(Cxxx)
COLUMN_ENTRY_TYPE(1,DBTYPE_DATE,m_tTime)
END_PARAM_MAP()
};
回复
DalyQiao 2004-01-29
DBTIMESTAMP
The DBTIMESTAMP structure typedef is defined as follows:

typedef struct tagDBTIMESTAMP {
SHORT year;
USHORT month;
USHORT day;
USHORT hour;
USHORT minute;
USHORT second;
ULONG fraction
} DBTIMESTAMP;

Members
year
The year (0 to 9999) is measured from 0 A.D.
month
The month ranges from 1 to 12 representing January through December.
day
The day ranges from 1 to a maximum of 31, depending on the number of days in the month.
hour
The hour ranges from 0 to 23.
minute
The minute ranges from 0 to 59.
second
The second ranges from 0 to 59.
fraction
The fraction represents billionths of a second ranging from 0 to 999,999,999.

回复
stephenland74 2004-01-28
楼主开发过ole db provider的程序吗?
回复
zhangcrony 2004-01-26
怎没人来解答呢,我也关注之......
回复
zhangcrony 2004-01-26
Studying......
回复
发动态
发帖子
数据库
创建于2007-09-28

3942

社区成员

VC/MFC 数据库
申请成为版主
社区公告
暂无公告