avendo la seguente funzione
che dovrebbe restituirmi un datareadercodice:<WebMethod()> _ Public Function RestituisciDataReader(ByVal Strsql As String) As Odbc.OdbcDataReader Dim Strconn As String = "Driver={Mysql ODBC 3.51 Driver};Database=db;UID=root;PWD=;PORT=5333;OemToAnsi=No;Server=localhost;OPTION=2083;" Dim Conn As New Odbc.OdbcConnection Conn.ConnectionString = Strconn Conn.Open() Dim res As Odbc.OdbcDataReader Dim Com As New Odbc.OdbcCommand Dim i As Integer Com.CommandType = CommandType.Text Com.CommandText = Strsql Com.Connection = Conn res = Com.ExecuteReader res.Read() Return res res.Close() Conn.Close() End Function
mi da errore di
"riferimento a oggetto non impostato su istanza di oggetto"
cosa posso fare?
ricordo che questa funzione si trova in un servizio web
grazie

Rispondi quotando