473,698 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
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 4437
jamesd0142
469 Contributor
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
zorcetto
2 New Member
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 Contributor
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
2536
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 large and performance low, the application freezes. It seems that it is timing out. Recently I was trying to hit an oracle database and got the same problem. In this case, I query a view. When I query a view on a large database, the progam...
1
1949
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 Basic give me this small footprint ? Q - What back-end database is advisable (I'm familiar with MySQL), considering that the tables will be small ? Basic goal is that the application should be universally downloadable,
3
7892
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 indexed by my SQL server From: Company: Status: Date: Phone Primary:
1
1667
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 c#. I need to be able to list what columns are available in the excel file, so the user can map these to a ms sql table. Dim oExcelApp As New Excel.Application() Dim oWorksheet As Excel.Worksheet Dim i As Integer = 0
182
7508
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
2
1596
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: I am working on a network invrntory solution for my department. We're using a great little utility to audit each machine on the network, storing all kinds of information about hardware and software in an access database on one of the public...
28
3583
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 business basic. I need to re-write it, bring it kicking and screaming to run on Windows XP. This is for a video rental place, tracks movie and game rentals, customers, employee transactions, reservations, does reports,..... and on. I know some of...
0
1109
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 form as my data entry. Every time I go to add a new record to my dataset to save to my Table, I receive this error message... 'An unhandled exception has occurred in your application ... Column "FP" does not allow nulls.' Now FP is a column in...
1
1463
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 WANT A DEMOSTRATION FORMS THAT WILL EXPLAIN HOW TO DESIGN THE DATABASE. AFTER THAT,
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.