Solved

SQL String

Posted on 2002-04-18
4
175 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
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
satj2000 earned 100 total points
Comment Utility
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
Comment Utility
It looks like very simple!!
Works fine, thanks!
0
 
LVL 1

Expert Comment

by:satj2000
Comment Utility
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
Comment Utility
BTW if you use a decimal 235.35, then SQL Server/ADO Provider will convert for any locality anyway...
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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.
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 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…

772 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

16 Experts available now in Live!

Get 1:1 Help Now