|
-
Feb 20th, 2003, 03:52 AM
#1
Thread Starter
New Member
Oracle Dates
I have been using Oracle as Back-end to my VB Project..During a database insertion routine when I try to insert a VB date field into the Oracle Database I get the following error :
"Runtime Error '-2147467259(80004005)'
[Oracle][ODBC][Ora]ORA-00932:Inconsistent Datatypes
The SQL query string executed is given below :
strQry = "insert into TAS_EMPLOYEE values ('" & ecode & "','" & ename & "','" & des & "','" & gid & "','" & sex & "','" & dob & "' ,'" & doj & " ','" & email & "'," & phone & ")"
dob and doj are date fields...
can somebody help..
VR.
-
Feb 20th, 2003, 05:36 AM
#2
Well ...
What are the values of the date variables when you try to use them in the query?
.
-
Feb 20th, 2003, 07:31 AM
#3
Frenzied Member
Can you show the value of strQry before executing it.
And maybe show a datefields value of your db.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
-
Feb 20th, 2003, 12:46 PM
#4
Addicted Member
Try re-formating to dd-mmm-yyyy format before inserting the date values.
strQry = "insert into TAS_EMPLOYEE values ('" & ecode & "','" & ename & "','" & des & "','" & gid & "','" & sex & "','" & Format(dob, "dd-mmm-yyyy") & "' ,'" & Format(doj, "dd-mmm-yyyy") & " ','" & email & "'," & phone & ")"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|