tutto esatto sypher
solo che sto facendo un web method-->un servizio web
e mi da errore riferimento a oggetto non impostato su istanza di oggettocodice:<WebMethod()> _ Public Function RestituisciDataReader(ByVal Strsql As String) As Odbc.OdbcDataReader 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

Rispondi quotando