Home All Groups Group Topic Archive Search About

error-'ExecuteNonqury' on type 'SqlCommand' not found

Author
10 Dec 2004 9:52 PM
JenHu
Hi all,


I have an error message: "Public member 'ExecuteNonqury' on type
'SqlCommand' not found."
on objComd.ExecuteNonqury().

Can someone point me out where did I do wrong?  Thanks.

The code is like this:
-----------------------------------
Dim strSQL As String
     strSQL = "UPDATE Epay_Transaction_Table SET EAcct_Num =' " &
sEfundNum & "' and Error_Code='" & sErrorCode & "' where
EmployID='" & sEmpID & "' and Batch_Num=' " & BatchNum
& "'"
      Dim objComd = New SqlCommand(strSQL, EpayConnection)
      EpayConnection.Open()
      objComd.ExecuteNonqury()
      EpayConnection.Close()

*-----------------------*
        Posted at:
  www.GroupSrv.com
*-----------------------*

Author
10 Dec 2004 10:19 PM
Rich
I think it's ExecuteNonQuery, not ExecuteNonQuery.

If that doesn't help, put the method call in a TRY....CATCH block.  If it
raises an exception, the message property of the exception object will
contain (usually) a very informative error message.

Good Luck

JenHu" wrote:

Show quote
> Hi all,
>
>
> I have an error message: "Public member 'ExecuteNonqury' on type
> 'SqlCommand' not found."
> on objComd.ExecuteNonqury().
>
> Can someone point me out where did I do wrong?  Thanks.
>
> The code is like this:
> -----------------------------------
> Dim strSQL As String
>      strSQL = "UPDATE Epay_Transaction_Table SET EAcct_Num =' " &
> sEfundNum & "' and Error_Code='" & sErrorCode & "' where
> EmployID='" & sEmpID & "' and Batch_Num=' " & BatchNum
> & "'"
>       Dim objComd = New SqlCommand(strSQL, EpayConnection)
>       EpayConnection.Open()
>       objComd.ExecuteNonqury()
>       EpayConnection.Close()
>
> *-----------------------*
>         Posted at:
>   www.GroupSrv.com
> *-----------------------*
>
Author
10 Dec 2004 10:27 PM
Sahil Malik
Hmm .. ur using Visual Studio .. intellisense should've pointed this out ..
hope this is a compile time error you are getting.

The problem is definitely Query not Qury !!

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik

Show quote
"JenHu" <jenniferh***@hotmail-dot-com.no-spam.invalid> wrote in message
news:41ba1aaa$1_3@Usenet.com...
> Hi all,
>
>
> I have an error message: "Public member 'ExecuteNonqury' on type
> 'SqlCommand' not found."
> on objComd.ExecuteNonqury().
>
> Can someone point me out where did I do wrong?  Thanks.
>
> The code is like this:
> -----------------------------------
> Dim strSQL As String
>      strSQL = "UPDATE Epay_Transaction_Table SET EAcct_Num =' " &
> sEfundNum & "' and Error_Code='" & sErrorCode & "' where
> EmployID='" & sEmpID & "' and Batch_Num=' " & BatchNum
> & "'"
>       Dim objComd = New SqlCommand(strSQL, EpayConnection)
>       EpayConnection.Open()
>       objComd.ExecuteNonqury()
>       EpayConnection.Close()
>
> *-----------------------*
>         Posted at:
>   www.GroupSrv.com
> *-----------------------*

AddThis Social Bookmark Button