R
Reny J Joseph Thuthikattu
Hi,
In My Oracle table i have severla fields in that i want to filter the result
based on two Date fileds and One Number field .I am using ODBC.NET Data
Provider to connect to Oracle.The TIMEOFCONTACT filed format is 'HH24:MI:SS'
i.e contain onlly yhe time
The SQL is like this
select * from RECORDS_T WHERE DATEOFCONTACT = ? AND TIMEOFCONTACT=? AND
CONTACT_NUMBER =? "
Dim cmd As New OdbcCommand(sqlstr, OdbcConn)
OdbcConn.Open()
cmd.Parameters.Add("DATEOFCONTACT", OdbcType.Date, 0, "DATEOFCONTACT").Value
= dateOfcall
cmd.Parameters.Add("TIMEOFCONTACT", OdbcType.DateTime, 0,
"TIMEOFCONTACT").Value = TIMEOFCONTACT
cmd.Parameters.Add("CONTACT_Number", OdbcType.Decimal, 0,
"CONTACT_NUMBER").Value = CONTACT_No
OdBcOdr = cmd.ExecuteReader(CommandBehavior.SingleResult)
At this point i am getting no result even though there is value in the DB.
Can any one help me out
Reny
In My Oracle table i have severla fields in that i want to filter the result
based on two Date fileds and One Number field .I am using ODBC.NET Data
Provider to connect to Oracle.The TIMEOFCONTACT filed format is 'HH24:MI:SS'
i.e contain onlly yhe time
The SQL is like this
select * from RECORDS_T WHERE DATEOFCONTACT = ? AND TIMEOFCONTACT=? AND
CONTACT_NUMBER =? "
Dim cmd As New OdbcCommand(sqlstr, OdbcConn)
OdbcConn.Open()
cmd.Parameters.Add("DATEOFCONTACT", OdbcType.Date, 0, "DATEOFCONTACT").Value
= dateOfcall
cmd.Parameters.Add("TIMEOFCONTACT", OdbcType.DateTime, 0,
"TIMEOFCONTACT").Value = TIMEOFCONTACT
cmd.Parameters.Add("CONTACT_Number", OdbcType.Decimal, 0,
"CONTACT_NUMBER").Value = CONTACT_No
OdBcOdr = cmd.ExecuteReader(CommandBehavior.SingleResult)
At this point i am getting no result even though there is value in the DB.
Can any one help me out
Reny