Home > ASP.NET, Postgresql - SQL, Webmaster > asp.net cannot be accessed with an instance reference; qualify it with type name instead

asp.net cannot be accessed with an instance reference; qualify it with type name instead

cannot be accessed with an instance reference; qualify it with type name instead

            IDataReader dr;    

            // dr = ethax.MyGetSPo( 1 , "_getrma", myConnectionax);

            string mySqlQuery = "SELECT * FROM rma ORDER ORDER BY itemid DESC LIMIT 1"; 
            // OK  
            dr = ASPNetPortal.my_qa.mySqlQueryIDR(mySqlQuery, "ethax");
            // mistake -> not istance
            ASPNetPortal.my_qa _queryIDR = new ASPNetPortal.my_qa();
            dr = _queryIDR.mySqlQueryIDR(mySqlQuery, "ethax");
            
            // Complete
            NpgsqlConnection dbconsp;
            string NpgsqlConnectionString;
            NpConnections tNpConnection = new NpConnections();
            NpgsqlConnectionString = tNpConnection.NpgsqlConnectionStr();
            NpgsqlConnectionString = tNpConnection.NpgsqlConnectionStr("ethax");
            dbconsp = new NpgsqlConnection(NpgsqlConnectionString);
            dbconsp.Open();
            NpgsqlCommand _cmd = new NpgsqlCommand(mySqlQuery, dbconsp);
            dr = _cmd.ExecuteReader();   

class-member-instance-type

Risorse:

Annunci
  1. Non c'è ancora nessun commento.
  1. No trackbacks yet.

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger hanno fatto clic su Mi Piace per questo: