|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Finding the number of records (count) of a recordsetDim con2 As New SqlClient.SqlConnection("Data Source=RE....
Dim Tall as Integer Dim cmdCount As New SqlClient.SqlCommand( _ "SELECT Count(tblToDo.ToDoID) AS AntallMeldinger " & _ "FROM tblToDo WHERE Bruker = '" & Bruker & "'", con2) con2.Open() cmdCount.ExecuteNonQuery() con2.Close() How do I get get Tall to be the AntallMeldinger ? reidarT reidarT,
I think you can use ExecuteScalar instead of ExecuteNonQuery: Tall = cmdCount.ExecuteScalar() Kerry Moorman Show quoteHide quote "reidarT" wrote: > Dim con2 As New SqlClient.SqlConnection("Data Source=RE.... > Dim Tall as Integer > Dim cmdCount As New SqlClient.SqlCommand( _ > "SELECT Count(tblToDo.ToDoID) AS AntallMeldinger " & _ > "FROM tblToDo WHERE Bruker = '" & Bruker & "'", con2) > con2.Open() > cmdCount.ExecuteNonQuery() > con2.Close() > > How do I get get Tall to be the AntallMeldinger ? > > reidarT > > >
Parsing between a character and sysmbol
Best Practice Error Handling Programmatically Crawl a DLL's Namespacec A little help with an array & 'NullReferenceException was unhandled' ?? Is there a repeat characters function? VB 2005 Syntax A windows service question Data Binding with CSV Files String function in VB vb.net richtextbox selectionstart coloring |
|||||||||||||||||||||||