?
Solved

SQL String

Posted on 2002-04-18
4
Medium Priority
?
181 Views
Last Modified: 2010-05-02
Hi,

I need to add lines to a table using the SQL instruction (e.g.) "INSERT INTO table (Customer, Cost) VALUES ('Company', 235,35)" Where 235,25 is the total amount for this company, for instance.
The problem is that in regional definitions i've set the comma (,) as the decimal simbol because i need that way to other apps and i can't change it and the VB generates an error because we have 2 fileds and 3 values. Of course the 235,35 is 235 units and 35 decimals.how can i handle this problem without changing Regional settings?
0
Comment
Question by:JParente
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
satj2000 earned 300 total points
ID: 6951978
You can simply use quotes!
Like this:
"INSERT INTO table (Customer, Cost)
VALUES ('Company', '235,35')"
Good Luck,
Ameen.
--------------------------------
Need cheap and reliable web hosting? Check out unlimitedhostingplans.com, sign up now and win a X-box!
0
 

Author Comment

by:JParente
ID: 6952043
It looks like very simple!!
Works fine, thanks!
0
 
LVL 1

Expert Comment

by:satj2000
ID: 6952049
You are welcome,
Good Luck,
Ameen.
--------------------------------
Need cheap and reliable web hosting? Check out unlimitedhostingplans.com, sign up now and win a X-box!
0
 
LVL 4

Expert Comment

by:nutwiss
ID: 6952256
BTW if you use a decimal 235.35, then SQL Server/ADO Provider will convert for any locality anyway...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question