Click here to Skip to main content
15,886,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Insert timestamp using datareader to oracle date Pin
kerek27-Oct-20 15:37
kerek27-Oct-20 15:37 
GeneralRe: Insert timestamp using datareader to oracle date Pin
Dave Kreskowiak7-Oct-20 17:58
mveDave Kreskowiak7-Oct-20 17:58 
GeneralRe: Insert timestamp using datareader to oracle date Pin
kerek226-Oct-20 20:27
kerek226-Oct-20 20:27 
GeneralRe: Insert timestamp using datareader to oracle date Pin
Richard Deeming26-Oct-20 22:19
mveRichard Deeming26-Oct-20 22:19 
GeneralRe: Insert timestamp using datareader to oracle date Pin
kerek227-Oct-20 13:47
kerek227-Oct-20 13:47 
GeneralRe: Insert timestamp using datareader to oracle date Pin
Dave Kreskowiak27-Oct-20 6:48
mveDave Kreskowiak27-Oct-20 6:48 
GeneralRe: Insert timestamp using datareader to oracle date Pin
kerek227-Oct-20 16:32
kerek227-Oct-20 16:32 
GeneralRe: Insert timestamp using datareader to oracle date Pin
Dave Kreskowiak27-Oct-20 18:27
mveDave Kreskowiak27-Oct-20 18:27 
You're trying to convert date strings being passed to the parameters to date values in the SQL VALUES clause. Don't do that because all you have to do is pass in DateTime values WITHOUT using "to_date" in the SQL.

And what's with the "" & garbage? Get rid of stuff. It's useless, unless you want to make the code harder to read and debug.

C#
oracmd.CommandText = " INSERT INTO ASIS.TIMECLOCK_DATE(TD_CARDHOLDER_ID,TD_EVENT_DATE,TD_FIRST_IN,TD_IN_READER,TD_IP_CONTROLLER,TD_TYPE) " & _
" VALUES (:CARDHOLDERID, :EVENTDATE, :FIRSTIN, :READER, :IP, :TYPE)"

oracmd.Parameters.Add(":CARDHOLDERID", OracleType.VarChar).Value = IBSSDR.Item("ID")              oracmd.Parameters.Add(":EVENTDATE", OracleType.DateTime).Value = IBSSDR.Item("EVENT_DATE")
oracmd.Parameters.Add(":FIRSTIN", OracleType.DateTime).Value = IBSSDR.Item("EVENT_DATE")
oracmd.Parameters.Add(":READER", OracleType.VarChar).Value = IBSSDR.Item("DEVICE_ID")
oracmd.Parameters.Add(":TYPE", OracleType.VarChar).Value = "CHECKIN"


GeneralRe: Insert timestamp using datareader to oracle date Pin
kerek229-Oct-20 14:11
kerek229-Oct-20 14:11 
GeneralRe: Insert timestamp using datareader to oracle date Pin
Dave Kreskowiak29-Oct-20 14:13
mveDave Kreskowiak29-Oct-20 14:13 
GeneralRe: Insert timestamp using datareader to oracle date Pin
Victor Nijegorodov27-Oct-20 21:11
Victor Nijegorodov27-Oct-20 21:11 
GeneralRe: Insert timestamp using datareader to oracle date Pin
DerekT-P7-Oct-20 23:39
professionalDerekT-P7-Oct-20 23:39 
GeneralRe: Insert timestamp using datareader to oracle date Pin
kerek211-Oct-20 17:14
kerek211-Oct-20 17:14 
QuestionCreate an assignment operator that accepts as const value: CLOSED Pin
mo149230-Sep-20 5:36
mo149230-Sep-20 5:36 
Questionselect MIN(Date) value and other data from multiple table Pin
kerek228-Sep-20 22:46
kerek228-Sep-20 22:46 
SuggestionRe: select MIN(Date) value and other data from multiple table Pin
Richard Deeming29-Sep-20 0:10
mveRichard Deeming29-Sep-20 0:10 
GeneralRe: select MIN(Date) value and other data from multiple table Pin
kerek230-Sep-20 21:17
kerek230-Sep-20 21:17 
GeneralRe: select MIN(Date) value and other data from multiple table Pin
Richard Deeming30-Sep-20 22:03
mveRichard Deeming30-Sep-20 22:03 
AnswerRe: select MIN(Date) value and other data from multiple table Pin
DerekT-P29-Sep-20 7:37
professionalDerekT-P29-Sep-20 7:37 
AnswerRe: select MIN(Date) value and other data from multiple table Pin
Gerry Schmitz1-Oct-20 5:36
mveGerry Schmitz1-Oct-20 5:36 
QuestionChanging of date format problem upon retrieving in date field Pin
Member 1494895025-Sep-20 20:39
Member 1494895025-Sep-20 20:39 
AnswerRe: Changing of date format problem upon retrieving in date field Pin
Victor Nijegorodov25-Sep-20 21:11
Victor Nijegorodov25-Sep-20 21:11 
GeneralRe: Changing of date format problem upon retrieving in date field Pin
Member 1494895025-Sep-20 21:19
Member 1494895025-Sep-20 21:19 
GeneralRe: Changing of date format problem upon retrieving in date field Pin
Dave Kreskowiak26-Sep-20 5:49
mveDave Kreskowiak26-Sep-20 5:49 
AnswerRe: Changing of date format problem upon retrieving in date field Pin
Richard MacCutchan25-Sep-20 22:02
mveRichard MacCutchan25-Sep-20 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.