Re: Trouble with sqlCommand

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Michael C (me_at_mine.com)
Date: 01/18/05


Date: Tue, 18 Jan 2005 10:09:28 -0500

Trust me, we've all been there, done that :) Sometimes you just need a
fresh pair of eyes to scan it for you :)

Thanks

"Eduardo Rosa" <eduardo@clas.com.br> wrote in message
news:%23RTy5SM$EHA.3336@TK2MSFTNGP11.phx.gbl...
> that's so basic, I feel shame.
> thanks a lot
>
>
>
>
> "Michael C" <me@mine.com> escreveu na mensagem
> news:es4SWlL$EHA.1524@TK2MSFTNGP09.phx.gbl...
> > Change this line:
> >
> > SqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
> >
> > to sqlComm.CommandType = System.Data.CommandType.StoredProcedure;
> >
> > That's it.
> >
> >
> > "Eduardo Rosa" <eduardo@clas.com.br> wrote in message
> > news:%23XKeuVL$EHA.1264@TK2MSFTNGP12.phx.gbl...
> >> I can't undertand why that's don't works, can somebody help me?
> >>
> >> thanks a lot
> >>
> >>
> >> Description: An error occurred during the compilation of a resource
> > required
> >> to service this request. Please review the following specific error
> > details
> >> and modify your source code appropriately.
> >>
> >> Compiler Error Message: CS0120: An object reference is required for the
> >> nonstatic field, method, or property
> >> 'System.Data.SqlClient.SqlCommand.CommandType'
> >>
> >> Source Error:
> >>
> >>
> >> Line 1: bool ValidateUser(string strLogin, string strPassword, int
> > nLevel,
> >> SqlConnection sqlConn){
> >> Line 2: SqlCommand sqlComm = new SqlCommand("spValidateUser",
sqlConn);
> >> Line 3: SqlCommand.CommandType =
> >> System.Data.CommandType.StoredProcedure;
> >> Line 4:
> >> Line 5: SqlParameter sqlParamLogin = new SqlParameter("@Usuario",
> >> System.Data.SqlDbType.VarChar);
> >>
> >> Source File: C:\Meus DOC\Sites\Loja Virtual
.NET\www\library\functions.cs
> >> Line: 3
> >>
> >>
> >>
> >>
> >
> >
>
>



Relevant Pages

  • Re: Chastity (Silver) Ring Thing...
    ... You are an atheist who doesn't trust in God's plan for a husband/wife ... partner I pick with my eye will satisfy me much less than those God ... The eyes of man can only see the present, ... To save you wasting time reading his posts, I'd suggest you killfile MM, ...
    (uk.legal)
  • Re: Chastity (Silver) Ring Thing...
    ... You are an atheist who doesn't trust in God's plan for a husband/wife ... partner I pick with my eye will satisfy me much less than those God ... The eyes of man can only see the present, ... To save you wasting time reading his posts, I'd suggest you killfile MM, ...
    (uk.legal)
  • Re: Chastity (Silver) Ring Thing...
    ... You are an atheist who doesn't trust in God's plan for a husband/wife ... partner I pick with my eye will satisfy me much less than those God ... The eyes of man can only see the present, ... dodgy STD or two along the way (assuming she doesn't have one ...
    (uk.legal)