• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1055
  • Last Modified:

pervasive sql date error

Could someone tell me how to insert date on PERVASIVE, i have a table with a date field, i alway got an database error when i try to insert a record, i am using asp as front end

when i try to run the insert sql in the pervasive database the error
it gives this error
ODBC SQLSTATE = 22008 NATIVE error code=0
Invalid date,time or time stamp value

Her is the error in front end (page)

Run-Time error '12147217900(80040e14);
[Pervasive][Odbc Client Interface][LNA][Pervaiive][ODBC Engine Interface]Invalid date, time or timestamp value.


Please help
0
Bachia
Asked:
Bachia
  • 5
  • 4
1 Solution
 
TimYatesCommented:
Can you post your SQL?
0
 
BachiaAuthor Commented:
Yes i can post to MS SQL database but in pervasive i can't.
0
 
BachiaAuthor Commented:
in MS SQL database i am able to insert the date
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
TimYatesCommented:
http://www.experts-exchange.com/Databases/Btrieve/Q_21480522.html

Does that help?

I meant can you post your SQL insert statement you are using ;-)

Tim
0
 
BachiaAuthor Commented:
here is the SQL

dim pop,poprec
poprec = "INSERT INTO HistoryHeader(DocumentType,DocumentNumber,CustomerCode,OrderNumber,Message01,Message02,Telephone,Fax,Contact,Total,Period,TotalCost,FCurrTotal,TotalTax,FCurrTotalTax,Date) VALUES(" &_
              "'"&request.Form("document_type")&"'"&_
              ",'"&request.Form("invoice_num")&"'"&_
              ",'"&request.Form("Customers")&"'"&_
              ",'"&request.Form("invoice_ref_no")&"'"&_
              ",'"& request.Form("invoice_message1")&"'"&_
              ",'"& request.Form("invoice_message2")&"'"&_
            ",'"& request.Form("telephone")&"'"&_
            ",'"& request.Form("fax")&"'"&_
            ",'"& request.Form("contact_person")&"'"&_
            ",'"& request.Form("invoice_Amount")&"'"&_
            ",'"& request.Form("period")&"'"&_
            ",'"& request.Form("invoice_Amount")&"'"&_
            ",'"& request.Form("invoice_Amount")&"'"&_
",'"& request.Form("invoice_Amount") * request.Form("quantity") * request.Form("tax_type")&"'"&_
            ",'"& request.Form("invoice_Amount") * request.Form("quantity") * request.Form("tax_type")&"'"&_
",'"& request.Form("invoice_Date")&"'"&_
")"
             
set pop = MM_new_STRING.execute(poprec)
0
 
TimYatesCommented:
is the "invoice_Date" value in:

    yyyy-mm-dd

format?
0
 
BachiaAuthor Commented:
yes i have trie d to interchange the date but still not working.
0
 
BachiaAuthor Commented:
Cool the date has worked i have added you another 80 point

thax a million

Abra
0
 
TimYatesCommented:
yay! :-)

glad I could help :-)

and thanks!

good luck!!

Tim
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now