Mysql5 + Select command, function and datareader

F

fabrice

Hello

I have created a function in my MYSQL Server 5.
I would like to call it via asp.net.
The function is running on mySQL Server. But if call it in my sql query it
doesn't work.

For example in vb.net

Dim mySQL As String = "SELECT column1,myfunction(2) as myfunction FROM
mytable'
...
Dim objCmd as New mySqlCommand (mySQL,myConnection)
Dim objDR As mySqlDataReader = objCmd.ExecuteReader()
objDR.Read()

DIM mytest as string = objDR("myfunction ").ToString()
response.write(mytest )


I get an error.
#42S22Unknown column 'myfunction' in 'field list'
MySql.Data.MySqlClient.MySqlException: #42S22Unknown column 'fcBretit' in
'field list'
....


if you know the right way to call mysql function in .net ...
thanks a lot...
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top