title image


Smiley Re: SELECT Count(Spalte) AS Anzahl from Tabelle (N.T.)
funzt nicht.

Fehlermeldung:

Additional information: Specified cast is not valid.

in der zeile: int myWert = (int)myCommand.ExecuteScalar();





der code:

string mySelectQuery = "SELECT Count(ROUTE) AS Anzahl FROM bewelc.V_ALL_ACTIVE_ROUTES";



OleDbConnection myConnection = new OleDbConnection(connectionString);

OleDbCommand myCommand = new OleDbCommand(mySelectQuery,myConnection);



myConnection.Open();



int myWert = (int)myCommand.ExecuteScalar();

MessageBox.Show(myWert.ToString());

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: