How to execute a Sql Function

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top