Query results

Zaffryn

New member
Joined
Oct 2, 2013
Messages
4
Programming Experience
Beginner
Good day,

I was wondering if anyone could direct me in the right direction. I am currently getting the sum of a row in my database but the answer to this
VB.NET:
SELECT Sum([Event_TotalTime]) AS Expr1
FROM tbl_Event;

needs to go in a variable so I can manipulate the answer. The results and the new variable are both integer.

Thank you
 
You would create an appropriate ADO.NET command object and then call its ExecuteScalar method, which is specifically for retrieving a single value. You'll find an example of that, as well as several other common ADO.NET scenarios here:

Retrieving and Saving Data in Databases
 
Back
Top