We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

pervasive sql date error

Bachia
Bachia asked
on
Medium Priority
1,392 Views
Last Modified: 2012-05-05
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
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2004

Commented:
Can you post your SQL?

Author

Commented:
Yes i can post to MS SQL database but in pervasive i can't.

Author

Commented:
in MS SQL database i am able to insert the date
CERTIFIED EXPERT
Top Expert 2004

Commented:
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

Author

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)
CERTIFIED EXPERT
Top Expert 2004
Commented:
is the "invoice_Date" value in:

    yyyy-mm-dd

format?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
yes i have trie d to interchange the date but still not working.

Author

Commented:
Cool the date has worked i have added you another 80 point

thax a million

Abra
CERTIFIED EXPERT
Top Expert 2004

Commented:
yay! :-)

glad I could help :-)

and thanks!

good luck!!

Tim
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.