Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


SQL String

Posted on 2002-04-18
Medium Priority
Last Modified: 2010-05-02

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?
Question by:JParente
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

Accepted Solution

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,
Need cheap and reliable web hosting? Check out unlimitedhostingplans.com, sign up now and win a X-box!

Author Comment

ID: 6952043
It looks like very simple!!
Works fine, thanks!

Expert Comment

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

Expert Comment

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

618 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