By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,153 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

Problem in DTPicker

P: 9
Hi..

I'd a problem while using the DTPicker in VB form.

While executing the sql statement,

cn.execute "insert into empdetails values(' " & DTPicker1.value & " ')"

Got the error as overflow.... pl help me..how to avoid this...?

Sree
Apr 24 '08 #1
Share this Question
Share on Google+
4 Replies


Expert 100+
P: 487
You must explain your problem in detail.

Expand|Select|Wrap|Line Numbers
  1. "insert into empdetails values(#" & DTPicker1.value & "#)"
the date time is not a string (in MS Access)
Apr 24 '08 #2

P: 9
You must explain your problem in detail.

Expand|Select|Wrap|Line Numbers
  1. "insert into empdetails values(#" & DTPicker1.value & "#)"
the date time is not a string (in MS Access)

Hi..

Thks a lot for ur quick reply..
I'm using sql and not ms access..
I'm getting error as overflow while running this form...
How to insert this date into the database using sql query?

Sree....
Apr 24 '08 #3

Expert 100+
P: 487
Expand|Select|Wrap|Line Numbers
  1. "insert into empdetails values(#" & Format(DTPicker1.value,"yyyy/MM/dd") & "#)"
You have to pass the date fomat like "MM/dd/yyyy" or "yyyy/MM/dd". (Asum that will be date month overflow).
Apr 24 '08 #4

P: 9
hi..

thks alot..

Sree.
Apr 28 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.