Post by PankajHi John,
This is code i am using.
Set db = New ADODB.Connection
Conn = "UID= FPOWER_PAN" & ";PWD=FPOWER_ PAN " & ";DRIVER={Microsoft
ODBC For Oracle};" _
& "SERVER= PAN.WORLD" & ";"
With db
.ConnectionString = Conn
.CursorLocation = adUseClient
.Open
End With
Set cFund = db.Execute("Insert into FZTempTbl(EntryDate) Values(" &
ADate & ")")
Where aDate is system Date.
Thanks,
Pankaj
First problem, don't use ODBC, use an OLEDB provider. , typically:
Provider=MSDAORA.1;Data Source=PAN.WORLD;User ID=FPOWER_PAN;Password=FPOWER_
PAN
Second, you haven't shown what aDate is. Do you mean it is a date variable?
If so, you are relying on Oracle being able to interpret it correctly,
instead you should tell Oracle what format it is in:
db.Execute("Insert into FZTempTbl(EntryDate) Values(" & _
"TO_DATE('" & Format(ADate , "DD-MMM-YYYY") & "','DD-MON-YYYY'))")
--
John Blessing
http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook