help with insert/updating date variables in table getting error Invalid cast from Boolean to DateTim

G

Guest

when I am trying to insert in a table I am getting exception Invalid cast from Boolean to DateTime.
table (mdb) has variable defined as datetime as short date.
setting the variable as #01/11/1963#
Is there a special way to set date
thanks for your help.
 
C

Carl Prothman [MVP]

when I am trying to insert in a table I am getting exception
Invalid cast from Boolean to DateTime. table (mdb) has variable
defined as datetime as short date.
setting the variable as #01/11/1963#
Is there a special way to set date
thanks for your help.

Try using the following parameter (watch for text wrapping)

OleDbInsertCommand1.Parameters.Add(New
OleDb.OleDbParameter("DateTimeColumn", OleDb.OleDbType.DBDate, 0,
"DateTimeColumn"))

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top