|
Which database system? And how are you updating? If through an update statement, where is it?
|
|
|
|
|
MSSQL-TSQL
From Calucaltor TRUE RESULT : 164016 * 9155 = 1501566480
I check form profiler:
Update TestTable Set Con=@Con, Ust=@Ust, En =@En,Tem=@Tem, Where ID=@ID',N'@Con decimal(6,0),@Ust decimal(4,0),@En decimal(10,0),@Tem decimal(3,2), ID bigint',@Con=164016,@Ust=9155,@En=1501566480,@Tem=7.50,@ID=95452
Finally I check database to see value:
select str(En,25,5) as ToSeevalue, En, Con , Ust,* from TestTable where ID = 95452
-- REsult (WRONG OUTCOME):
ToSeevalue: 1501566464.00000 En: 1,501566E+09 Con: 164016 Ust: 9155
|
|
|
|
|
I don't understand how ToSeevalue is updated, is it a calculated field?
|
|
|
|
|
What do you mean by "wrong outcome"? Please explain exactly what, in the above, is considered wrong.
Veni, vidi, abiit domum
|
|
|
|
|
Also what types are the following?
Con
Ust
En
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
I found a solution .Column data type was real I changed it.Now it's decimal (38,4)
|
|
|
|
|
Update the original question and the title to indicate that your issue has been fixed. Also, please describe your fix.
|
|
|
|
|
hello!
I have a table that it has a field.
the content of this field Containing different of information such as phone number,address and ...
I separated this filed.This means that for each group I have create
a table like main table(number of field and datatype)
now I want add fields to main table that number of added field equal number of table.but I don't know how insert this information to this fields?
please help me.
|
|
|
|
|
Hi,
Could you post some example? I am not sure what you are trying to achieve...
|
|
|
|
|
You've already asked a similar question in the same forum, please do not litter the forum with duplicate questions. If you wish to add information to your question, edit your original question and add the information there. Posting duplicate questions will not get you any helpful answers unless you explain your problem well. If English is not your primary language, you can explain your problem with examples.
|
|
|
|
|
I have a database application I was designing that I haven't worked on in a while. Recently I started it up to start working on it again and I was getting a connection error when trying to connect to the database. The error message is:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
and the connection string is "Server=localhost;Database=medicehr_provider;Uid=root;Pwd=********;"
However if I replace 'localhost' with '127.0.0.1' then my application can connect to the MySql server. I can't figure out why all of a sudden it needs the actual IP address. I checked the hosts file in C:\Windows\System32\Drivers\etc and it does contain an entry for localhost.
Any ideas or suggestions why 'localhost' isn't being recognized and '127.0.0.1' is would be greatly appreciated.
|
|
|
|
|
Can you ping localhost? If yes, then it's probably the driver - did you recently update it?
DisIsHoody wrote: it does contain an entry for localhost. In which form?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Can you ping localhost?
That isn't really going to tell you anything. If it succeeds it tells you nothing about the database. If it fails, if that is even possible, it just means localhost is redirected. But still says nothing about the database.
|
|
|
|
|
jschell wrote: That isn't really going to tell you anything. It's going to tell me whether the DNS and the host-file know what IP I'm talking about.
jschell wrote: But still says nothing about the database. I'm interested in reaching the PC before I reach for a specific database on that PC.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: It's going to tell me whether the DNS and the host-file know what IP I'm talking about.
You do know that the OP is asking about "localhost" correct?
|
|
|
|
|
Yes
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
DisIsHoody wrote: Any ideas or suggestions why 'localhost' isn't being recognized
1. You have set something up somewhere that resolves 'localhost' to something besides your local host.
2. The database server has been configured to host itself specifically on your IP and is not hosted on 'all' IPs on the box.
You can determine the first by using nslookup or whatever the equivalent is for your OS.
|
|
|
|
|
Add
127.0.0.1 localhost
in your C:\Windows\System32\drivers\etc\hosts file
|
|
|
|
|
@Eddy: From the command prompt I typed "ping localhost" and the response was "Reply from ::1: time=1ms" so it is recognizing localhost, although I expected it to say "127.0.0.1" instead of "::1: which if I'm not mistaken is IPv6. Could this be the source of the issue?
@jschell: In response to item 2, how can I check this? I'm using MySQL Community Edition and I do all my set up/maintenance through MySQL WorkBench. Can you provide some guidance on this?
@SarveshShukla: In my original post I mentioned I already checked this and there was already an entry for 127.0.01 to localhost.
Thank you so far for all the help and suggestions. It is greatly appreciated.
P.S. I forgot to mention that although I'm using MySQL Workbench and all my database design was originally pure MySQL I did change it to MariaDB and also use HeidiSQL for when I design my tables and whatnot. I checked and MySQL Workbench still connects to the tables and I can modify/create/update table schemas and data in either HeidiSQL or MySQL Workbench and the other program will see the appropriate changes. But as far as the actually database server settings I still use MySQL Workbench.
|
|
|
|
|
This is not facebook or twitter.
Please reply to each message by clicking the "Reply" link end of each message(Like I replied you).
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
DisIsHoody wrote: Could this be the source of the issue? Yes. Replace it with 127.0.0.1, and try again.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
DisIsHoody wrote: @jschell: In response to item 2, how can I check this?
Myself I use telnet (client). If you do not have this installed already then it already in the OS (windows) just go the "control panel" -> "Programs and Features" -> "Turn Windows features on or off" and then look for "Telnet Client".
You run telnet with the following command in a console window.
telnet <host> <port>
All you care about is whether it connects or not. If it connects you get a blank screen. If it fails, which can take some time (or not) you get an error.
You can find the regular ip of your computer by running the following command (windows) in a console window.
ipconfig
Both of the databases you cited use port 3306 by default.
So using the above the following three commands should tell you what is going on.
telnet local host 3306
telnet 127.0.0.1 host 3306
telnet <box ip address> host 3306
If all three fail then it means you are using a different port.
If just the localhost one fails then it means you have redirected local host.
If just the first two fail then it means that you have set your database up to bind to your regular ip and not 127.0.0.1.
The above of course makes the assumption that your really are running the database on your local box (and that your test with the GUI tool was valid and was actually connecting to the database on your box and not some database on another box.)
|
|
|
|
|
Hi I want to learn the basics of database. What is it?How we establish it.How can I attach it to my website.Please provide me some good tutorials for learning it. Thanks in advance.
|
|
|
|
|
There are multiple questions here and a variety of answers. To start with, there different types of databases by multiple companies. I would start out with MySql or MariaDB as both of these are available without paying a licensing fee.
Once you have determined what type of database you want to use then you have to determine what web technology you want to learn/use; ASP.NET, PHP, Java, etc.
Your question(s) are a too general to give you a specific answer. Google is your friend in this case. I would start by going to MySQL 5.6 Reference Manual. From this page you can learn everything about MySQL; tutorials, installation, administration. Download the software, read through the manual, and then if you have any specific questions I'm sure people here will help you as much as they can.
|
|
|
|
|