473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

updating a deciimal (sql in VB.Net)

Hallo,

could you help with this problem?
Updating an integer, as tring ok, but a decimal ??
Update tblprice Set article = ' " & this & " ' WHERE ...
what signs do I have to put?
Thx for helping me

--
Hyphessobrycon
Nov 21 '05 #1
3 966
You should not use quotes (not single nor double) to update numeric values
in SQL.
Instead, leave the value "as is":
tmpSQL = "update MyTable set MyIntegerValue = " & MyInt & ", MyDecimalValue
= " & MyDec & ", MyStringValue = '" & MyString & "', MyBooleanValue = " &
CInt(MyBool)
I don't know if this is what you want. Let me know.
Hope this helps.
VBen.

"Hyphessobricon" <sy*********@telenet.be> escribió en el mensaje
news:tq********************@phobos.telenet-ops.be...
Hallo,

could you help with this problem?
Updating an integer, as tring ok, but a decimal ??
Update tblprice Set article = ' " & this & " ' WHERE ...
what signs do I have to put?
Thx for helping me

--
Hyphessobrycon

Nov 21 '05 #2
"VBen" <bm******@compucaremexico.com> schrieb:
You should not use quotes (not single nor double) to update numeric values
in SQL.
Instead, leave the value "as is":
tmpSQL = "update MyTable set MyIntegerValue = " & MyInt & ",
MyDecimalValue
= " & MyDec & ", MyStringValue = '" & MyString & "', MyBooleanValue = " &
CInt(MyBool)


.... and even better, use a parameterized '*Command' object instead of
inserting the values into the SQL command string by hand.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

"VBen" <bm******@compucaremexico.com> schreef in bericht
news:ew**************@TK2MSFTNGP10.phx.gbl...
You should not use quotes (not single nor double) to update numeric values
in SQL.
Instead, leave the value "as is":
tmpSQL = "update MyTable set MyIntegerValue = " & MyInt & ",
MyDecimalValue
= " & MyDec & ", MyStringValue = '" & MyString & "', MyBooleanValue = " &
CInt(MyBool)
I don't know if this is what you want. Let me know.
Hope this helps.
VBen.

"Hyphessobricon" <sy*********@telenet.be> escribió en el mensaje
news:tq********************@phobos.telenet-ops.be...
Hallo,

could you help with this problem?
Updating an integer, as tring ok, but a decimal ??
Update tblprice Set article = ' " & this & " ' WHERE ...
what signs do I have to put?
Thx for helping me

--
Hyphessobrycon


That's exactly what I was looking for.
Thanks an awful lot VBen

a thankful Hyphessobrycon
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: | last post by:
Hello, Sorry to ask what is probably a simple answer, but I am having problems updating a table/database from a PHP/ PHTML file. I can Read From the Table, I can Insert into Table/Database, But...
6
by: Hennie de Nooijer | last post by:
Hi, Currently we're a building a metadatadriven datawarehouse in SQL Server 2000. We're investigating the possibility of the updating tables with enormeous number of updates and insert and the...
1
by: Mark | last post by:
I'm having a problem updating recordsin an Access DB table. I can update other tables in this db with no problem, and I can dreate new record in all of the tables (including this one.)> But I can't...
3
by: | last post by:
Hello, I have created an ASP.NET 2.0 application that utilized a Gridview Control to display and update/delete data. The problem I am having is that the gridview control is displaying the data...
10
by: jaYPee | last post by:
does anyone experienced slowness when updating a dataset using AcceptChanges? when calling this code it takes many seconds to update the database SqlDataAdapter1.Update(DsStudentCourse1)...
34
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing that resulted in data in temp tables, I would have...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
14
by: John T Ingato | last post by:
I have a contacts table with name address and such but are missing all phone numbers in the phone number fields. I have just received an updated customer list in Excel and have imported into a new...
3
by: John Morgan | last post by:
I have my first small SQl Server 2005 database developed on my local server and I have also its equivalent as an online database. I wish to update the local database (using and asp.net interface)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.