473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

i want to sum one column in the database using Visual Basic 6

hi....
plz help me
i have table in database using access 2003 ,wanna make summation 2 column in it
so 1-which type of data choose (microsoft data grid...or etc)
2- the code entering in sub command to do the summation


so plzzz helpp mee .....
Feb 5 '08 #1
3 4428
jamesd0142
469 256MB
hi....
plz help me
i have table in database using access 2003 ,wanna make summation 2 column in it
so 1-which type of data choose (microsoft data grid...or etc)
2- the code entering in sub command to do the summation


so plzzz helpp mee .....
First you will need to make a database connection and simply pass the sql statement:

select sum(<columnname>) from <tablename>
Feb 5 '08 #2
First you will need to make a database connection and simply pass the sql statement:

select sum(<columnname>) from <tablename>
thank u James ...
but i wanna more details in code as total ....
my program is that r 2 text box
text1 and text 2 and one sub command
wanna make code
as entering the value in text 1 recorded in database
and viewing the summation in the column in the database
+ i tried this code after connectiing the database
it gaves me "error " so help me
and thanks
Feb 6 '08 #3
jamesd0142
469 256MB
thank u James ...
but i wanna more details in code as total ....
my program is that r 2 text box
text1 and text 2 and one sub command
wanna make code
as entering the value in text 1 recorded in database
and viewing the summation in the column in the database
+ i tried this code after connectiing the database
it gaves me "error " so help me
and thanks

what was the error you recieved?
Your datatype must be 'integer' or 'number'...etc to get the sum.
Feb 8 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Norm | last post by:
I have run into problems from time to time (and this is one of those times) using visual basic to access an external database and perform a basic select from statement. When the table is extremely...
1
by: siliconmike | last post by:
I'm starting to learn Visual Basic. My aim is to develop a small downloadable application that can store and display contacts. It has to be small (say 2 mb footprint?). Q - First, will Visual...
3
by: jason | last post by:
I'll try to explain in detail what it is I'm struggling with. I created a SQL database with one table called CallSheet which contains the following columns: Caller ID: <--Primary Key, auto...
1
by: murl | last post by:
Is it just me or is there no easy way to open an excel file, and get the column names that are usually in the 1st row? I would like to be able to do this for a import tool im writing in vb.net and...
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
2
by: Hefestus | last post by:
Hey everyone, I have never really used access before and i now find myself knee deep in it trying to solve a problem. Hopefully someone has an idea. Anything would be great. Here's the problem:...
28
by: Randy Reimers | last post by:
(Hope I'm posting this correctly, otherwise - sorry!, don't know what else to do) I wrote a set of programs "many" years ago, running in a type of basic, called "Thoroughbred Basic", a type of...
0
by: csauer | last post by:
I am writing a program using visual basic.NET 2003 to be used to update and store data in a database I have stored in Access 2003. I am using a OdbcDataAdapter to generate my dataset, then using a...
1
by: vbsoft | last post by:
Hello My Name is Mike Am from Nigeria a student of computer Science, Pls i want your You to help in Using VISUAL BASIC 6.0 AND MS SQL SERVER AS DATABASE AS A CLIENT SERVER SIDE pLS: I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.