SQL String

Posted on 2002-04-18
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 can i handle this problem without changing Regional settings?
Question by:JParente
  • 2

Accepted Solution

satj2000 earned 100 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, 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, 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replace Formatted Numbers with text 9 61
how to open from address saved in DB? 26 173
Run code from text file in vb 1 56
How does CurrentUser work? 10 31
Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now