Re: executescalar()

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



Any idea what exception you are getting? ;)

"N! Xau" <nxau@xxxxxxxxxxx> wrote in message
news:1122389574.856810.58000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I'm trying to get the row count from a table, in the fastest way (con
> is the connection name).
>
> Dim NRows As Integer
> Dim CountQuery As String = "select count(*) from MyTable"
> Dim cmdNR As New OracleCommand(CountQuery, con)
> Try
> NRows = cmdNR.ExecuteScalar()
> Return NRows
> Catch ex As Exception
> ...
> End Try
>
>
> I get an Exception.
>
> TIA
> N! Xau
>


.



Relevant Pages

  • Re: executescalar()
    ... Dim i As Integer ... > I'm trying to get the row count from a table, in the fastest way (con ... > Dim NRows As Integer ... > Catch ex As Exception ...
    (microsoft.public.dotnet.languages.vb)
  • Re: executescalar()
    ... > I'm trying to get the row count from a table, in the fastest way (con ... > Dim NRows As Integer ... > Catch ex As Exception ...
    (microsoft.public.dotnet.languages.vb)
  • executescalar()
    ... I'm trying to get the row count from a table, in the fastest way (con ... Dim NRows As Integer ... Catch ex As Exception ...
    (microsoft.public.dotnet.languages.vb)
  • Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
    ... PreparedStatement pstmt = con ... Exception in thread "main" java.lang.AbstractMethodError: ... ResultSet resultset = readstmt.executeQuery("SELECT * FROM ... InputStream theimage = ...
    (comp.lang.java.databases)
  • Re: The Mermen
    ... On Dec 19, 4:45 pm, the long con ... suppose it's not AAHS with Mermen, ... Ray is the possible exception. ... You live for this, eh David? ...
    (rec.music.gdead)