Click here to Skip to main content
15,897,891 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: About Escape String for VB.NET connect MySQL Pin
N a v a n e e t h20-Jul-08 20:38
N a v a n e e t h20-Jul-08 20:38 
GeneralRe: About Escape String for VB.NET connect MySQL Pin
drexler_kk21-Jul-08 16:31
drexler_kk21-Jul-08 16:31 
GeneralRe: About Escape String for VB.NET connect MySQL Pin
N a v a n e e t h21-Jul-08 16:49
N a v a n e e t h21-Jul-08 16:49 
QuestionI need help....!! Pin
Member 374662916-Jul-08 17:07
Member 374662916-Jul-08 17:07 
AnswerRe: I need help....!! Pin
Christian Graus16-Jul-08 17:59
protectorChristian Graus16-Jul-08 17:59 
GeneralRe: I need help....!! Pin
Paul Conrad17-Jul-08 16:43
professionalPaul Conrad17-Jul-08 16:43 
AnswerRe: I need help....!! Pin
Paul Conrad17-Jul-08 16:43
professionalPaul Conrad17-Jul-08 16:43 
Questionformatting numbers from a text box Pin
digicd116-Jul-08 11:06
digicd116-Jul-08 11:06 
How can I format a textbox value into single data datatype with 2 decimals?

On my form I allow the user to type in a quantity and rate. Both fields are stored in a single data type. In addition, they are multiplied to get the billing amount. I would like to store them in the database with two decimals and make sure that the bill amount also has two decimals. Here is what I am currently doing - is this right or is there a better way?

'Variables to get the information from the screen. This runs if the field is numeric
m_OrdQty = CSng(Val(txtQuantity.Text))
m_MaterialCost = CSng(txtMatrlCost.Text.Trim)

'Database fields
m_MMatrltrns.OrderQuantity = CSng(Math.Round(m_OrdQty, 2))
m_MMatrltrns.BillRate = CSng(Math.Round(m_MaterialCost, 2))
m_MMatrltrns.BillAmount = CSng(Math.Round(m_MMatrltrns.BillRate * m_MMatrltrns.OrderQuantity, 2))


I looked into using the tostring("F") option and the format(field, "#.00") option but I am unsure as to which way is better.

Thank you in advance,

digicd1
AnswerRe: formatting numbers from a text box Pin
Mycroft Holmes16-Jul-08 20:17
professionalMycroft Holmes16-Jul-08 20:17 
GeneralRe: formatting numbers from a text box Pin
digicd122-Jul-08 10:49
digicd122-Jul-08 10:49 
QuestionORA-06502: PL/SQL: numeric or value error: character string buffer too smal Pin
ljammala16-Jul-08 10:39
ljammala16-Jul-08 10:39 
AnswerRe: ORA-06502: PL/SQL: numeric or value error: character string buffer too smal Pin
Mycroft Holmes16-Jul-08 20:22
professionalMycroft Holmes16-Jul-08 20:22 
GeneralRe: ORA-06502: PL/SQL: numeric or value error: character string buffer too smal Pin
ljammala17-Jul-08 2:15
ljammala17-Jul-08 2:15 
GeneralRe: ORA-06502: PL/SQL: numeric or value error: character string buffer too smal Pin
ljammala17-Jul-08 2:24
ljammala17-Jul-08 2:24 
QuestionNew Data Row Pin
zzsoulzz16-Jul-08 5:50
zzsoulzz16-Jul-08 5:50 
AnswerRe: New Data Row Pin
nlarson1116-Jul-08 6:52
nlarson1116-Jul-08 6:52 
AnswerRe: New Data Row Pin
paas16-Jul-08 6:59
paas16-Jul-08 6:59 
QuestionCalculating intervals using Dates Pin
KrisnNala16-Jul-08 5:41
KrisnNala16-Jul-08 5:41 
AnswerRe: Calculating intervals using Dates Pin
Luc Pattyn16-Jul-08 6:20
sitebuilderLuc Pattyn16-Jul-08 6:20 
GeneralRe: Calculating intervals using Dates Pin
KrisnNala16-Jul-08 7:21
KrisnNala16-Jul-08 7:21 
GeneralRe: Calculating intervals using Dates Pin
Luc Pattyn16-Jul-08 7:24
sitebuilderLuc Pattyn16-Jul-08 7:24 
GeneralRe: Calculating intervals using Dates Pin
KrisnNala16-Jul-08 7:34
KrisnNala16-Jul-08 7:34 
AnswerRe: Calculating intervals using Dates Pin
Guffa16-Jul-08 10:18
Guffa16-Jul-08 10:18 
AnswerRe: Calculating intervals using Dates Pin
Guffa16-Jul-08 10:18
Guffa16-Jul-08 10:18 
GeneralRe: Calculating intervals using Dates Pin
KrisnNala16-Jul-08 22:39
KrisnNala16-Jul-08 22:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.