|
-
August 9th, 1999, 08:31 AM
#1
SQL
HI!!
For example, I have this:
sqlwords = "insert into aaaa values('" & txt_name.Text & "'," & Val(txt_number.Text) & ")"
ConectionA.Execute sqlwords
In txt_number.Text I have a number with format. For example: 128.23
But the string named sqlwords, takes this number like 128,23
And the execution fails.
What can I do? Thanks in advance.
-
August 9th, 1999, 08:36 AM
#2
Re: SQL
remove the Val function as in
Dim sqlwords as string
sqlwords = "insert into aaaa values('" & txtName.Text & "'," & txtNumber.Text & ")"
MsgBox sqlwords
-
August 9th, 1999, 07:40 PM
#3
Re: SQL
Check the regional configuration of your computer, I had the same problem with this I use date and numbers and received errors in return or just a wrong string
Also if you have in SQL a column with the type number and you are sending a string like this '" & text.text & "' you will receive an error use this for the number type columns " & text.text & "
Hope this helps you
Regards
-
August 10th, 1999, 08:12 AM
#4
Re: SQL
Use Cdbl instead of using Val function since The val function converts into Numeric value so i suggest you tu use
CDbl where it takes the decimal value in the database
-
August 10th, 1999, 10:11 AM
#5
Re: SQL
Thanks to all !
The problem was the Val function and the Format function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|