R
Rex Cho via .NET 247
Though I used oleDB, and your select statement:
Imports System.Data.oledb
Dim con As OleDbConnection
Dim cmd1 As OleDbCommand
Dim totalStr As String = "SELECT(TO_NUMBER(to_date('18-AUG-2002')-to_date('14-AUG-2002'))) as Age FROM Calls"
con = New OleDbConnection(conStr)
con.Open()
cmd1 = New OleDbCommand(totalStr, con)
totalReportGrid.DataSource = cmd1.ExecuteReader()
totalReportGrid.DataBind()
con.Close()
I got an error msg like this;
Undefined function 'TO_NUMBER' in expression.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Undefined function 'TO_NUMBER' in expression.
How can I make it work?
Imports System.Data.oledb
Dim con As OleDbConnection
Dim cmd1 As OleDbCommand
Dim totalStr As String = "SELECT(TO_NUMBER(to_date('18-AUG-2002')-to_date('14-AUG-2002'))) as Age FROM Calls"
con = New OleDbConnection(conStr)
con.Open()
cmd1 = New OleDbCommand(totalStr, con)
totalReportGrid.DataSource = cmd1.ExecuteReader()
totalReportGrid.DataBind()
con.Close()
I got an error msg like this;
Undefined function 'TO_NUMBER' in expression.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Undefined function 'TO_NUMBER' in expression.
How can I make it work?