How to execute a Sql Function

  • Thread starter Thread starter Marco Roberto
  • Start date Start date
M

Marco Roberto

Hi,

how can I execute a Sql Function with ado.net?
The function name is "db.dbo.fn_get_max_date" and
it has not any parameter.

Regards,

Marco
 
SqlCommand objCmd = new SqlCommand("select db.dbo.fn_get_max_date()", sqlconnection)

sqlconnection.Open()
Response.Write((string) objCmd.ExecuteScalar())
sqlconnection.Close()

Suresh

----- Marco Roberto wrote: ----

Hi

how can I execute a Sql Function with ado.net
The function name is "db.dbo.fn_get_max_date" an
it has not any parameter

Regards

Marc
 
Back
Top