DB Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

SELECT * FROM `user` the_table WHERE the_table.userid = DB Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

SELECT * FROM `user` the_table WHERE the_table.userid = calculator in vb.net? - iTechForums
Login
Search   Moderators Wanted: If you're interested please send your portfolio to info[at]itechforums.com
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 3
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 10-25-2009, 09:29 PM
yara yara is offline
Junior Member
 
Join Date: Oct 2009
Posts: 1
Default

calculator in vb.net?


calculator in vb.net?

i am trying to make a calculator in vb.net. all i did was design the interface, write the code for the buttons from 0 to 9, and the code for the plus button. now am stuck ! what am i supposed to write for the rest ? how will the numbers be added when i press the equal button ? my calculator has only got numbers from 0 to 9, a plus, equal and a clear button. please someone help me !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2  
Old 01-27-2010, 01:05 PM
seoasia seoasia is offline
Junior Member
 
Join Date: Jan 2010
Posts: 26
Default

vb.net


vb.net

You are saying, you have done the coding for all buttons. first check are all buttons working properly. After that, coding for clear button, use that code Text1.Text=" ".
second step, you have to use some variables to retain the values of numbers.
Like Dim total1 As Integer
code for sum
Private Sub btnPlus_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnPlus.Click

total1 = total1 + Val(txtDisplay.Text)

txtDisplay.Clear()

you can do the same for minus sign.try that code. Hope it will be helpful for your calculator project
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 01-27-2010, 01:08 PM
seoasia seoasia is offline
Junior Member
 
Join Date: Jan 2010
Posts: 26
Default

you are saying, you have set the 0-9 number, first check are all number working properly. after that you can use that code for sum.
Private Sub btnPlus_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnPlus.Click

total1 = total1 + Val(txtDisplay.Text)

txtDisplay.Clear()

For clear text, use that code, txtDisplay.Text = ""

Hope it will be helpful for your calculator.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need some help with PHP calculator.? Sander V PHP 1 04-08-2009 02:11 AM
PHP! Need help with a calculator.? Ashley! PHP 0 04-07-2009 05:36 PM
PHP Calculator Question? Pirates9 PHP 0 09-21-2008 11:48 AM
Calculator in Delphi 7? Ivica M Delphi & Kylix 0 05-10-2008 05:43 AM

Your Ad Here

All times are GMT. The time now is 03:38 AM.