| |

VerySource

 Forgot password?
 Register
Search
Author: lovecjy01

How to convert data entered in textbox to money type in vb + sql server

[Copy link]

2

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-27 18:15:02
| Show all posts
It still doesn't work. My database used access before, which is good. Later, after converting to sql server2000, this problem occurred.
I checked a lot of information and changed the money type to int or other data types.
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-28 17:45:01
| Show all posts
First judge isnumeric and then ccur()
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-28 18:00:02
| Show all posts
Do not use cdbl() but ccur()
Reply

Use magic Report

1

Threads

12

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-8-8 12:45:01
| Show all posts
I have been developing software that uses SQLServer as a database. Please use the method I gave you above. Many of my database fields are of the Money type. This type is very easy to use. It is the same as Numeric (18/4). , Pay attention to two points when inserting values ​​into the database: 1. Do not insert non-numeric characters into the position where the data type should be, 2. Do not insert values ​​that exceed the range. If the problem still occurs, please find out if it is correct When you insert it, the position is incorrect, and the character is inserted into the value. In fact, Money is a numeric type, and other errors are impossible. If it still can’t be solved, please paste the text on your error dialog box.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list