ATL OLE DB 的一个具体问题

wizz 2004-01-26 03:39:22
用ATL模板向导生成的代码访问OLE DB,其他都没有问题,但是它把timestamp绑定成了DBTIMESTAMP,我不知道怎么用这种类型,关键是我insert的时候需要用NOW()函数啊,怎么实现?谢谢。
...全文
87 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
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......

4,011

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 数据库
社区管理员
  • 数据库
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧