System.NullReferenceException: Object reference not set to an instance of an object.
at Sistema.frmLogin.btnOk_Click(Object sender, EventArgs e) in D:\Documents and Settings\suporte\Meus documentos\Visual Studio 2005\Projects\SGC\Sistema de Gestão Comercial\frmLogin.cs:line 30
oh god.. why this have to be so complicated?
here is my code:
FbCommand cmd = new FbCommand("SELECT CLI_COD FROM CLIENTES WHERE CLI_NOME='" + txtUsuario.ToString() + "'", cn);
try {
int i = (int) cmd.ExecuteScalar();
} catch (Exception ex) {
MessageBox.Show(ex.ToString());
}
On 4/27/06, Jiri Cincura <[EMAIL PROTECTED]> wrote:
On 27.4.2006 20:18 Fabio Gomes wrote:
> int i = cmd.ExecuteScalar();
Simpliest way: int i = (int)cmd.ExecuteScalar();
--
Jiri Cincura
http://www.cincura.net/
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider