Hi all, I've got a problem when manipulating on float type data, I'm working on SQL Server 2005. Here is the code: DECLARE @First float, @Second float, @Third float SET @First = 1.22 SET @Second = 2.72 SET @Third = 3.94 SELECT @First + @Second - @Third The result is "4.44089209850063E-16" instead "0" I can't understand this situation Thanks a lot
vuthaianh
Posts
-
float type data problem -
How to detect a file if it is locked by another processHi all, I want to overwrite an existing file (acttually, it's an excel file). But i don't know whether it's in use or locked by another process or not. Is there a way to check that. Thanks.
-
Problem with variable table in SQLThanks a lot. The link you gave to me is very useful. I already sovled my problem. Thanks again.
-
Problem with variable table in SQLHi pmarfleet, Sorry, i made a typing mistake @Table must be @MyTable But the error does still appear. Thanks again
-
Problem with variable table in SQLHi all, I've got the following function: CREATE FUNCTION Test(....) RETURNS @ReturnTable TALBE ( ................. ) AS BEGIN DECLARE @MyTable TABLE ( ............. ) INSERT INTO @MyTable SELECT ...... FROM AnotherTable1 Inner Join AnotherTable2 ....... INSERT INTO @ReturnTable SELECT ...... FROM ( SELECT ...... FROM @MyTable WHERE ....... UNION SELECT ...... FROM @Table WHERE ...... ) RETURN END When i call this function, an error message appears "Must declare the scalar variable "@MyTable"." Please help me work out this problem Thanks so much
-
Format numberHi How can i format numeric data in SQL Server 2005 such as decimal places, use 1000 separator(,) example: 1234567.23 -> 1,234,567.23 Thanks
-
Problem when reading DBF filesHi all, I'm using Microsoft OLEDB Provider to read DBF files. But i just can read the file with less-than-8-character file name. Accidentally, I installed BDE (Borland Database Engine) and it solved the problem i presented above. I can't understand. Hope you helps me to figure it out Thanks
-
Problem occurs when running ASP.NET application on Windows Server 2003Hi all, When i installed the application on windows server 2003, all buttons (server control) didn't react when i clicked them. But when i installed the application on windows XP, the application was running nornally, everything was just fine. I don't know what problem is. Did i miss something. Hope you help me to firgure it out. Thanks so much
-
SqlConnection ErrorHi all, An error occurs when i use SqlConnection object to connect to Sql Server Here is the stack trace: at LoadLibraryW(UInt16* ) at System.EnterpriseServices.Thunk.Security.Init() at System.EnterpriseServices.Thunk.Security.SuspendImpersonation() at System.EnterpriseServices.Platform.Initialize() at System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) at System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl)\n at System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl, IntPtr SID) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() I actual can't understand and don't know how to resolve the problem Thanks
-
Problem when reading DBF filesThanks Evan, this helps me much
-
Problem when reading DBF filesHi Evan, The ConnectionString i'm using to read *dbf files is "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " + directoryName + "; Extended Properties=dBASE IV; User ID=; Password=;"" My current solution is copying that DBF file to temporary DBF file which has a legal name (length of filename <= 8), processing on the temporary file and deleting it after finishing. If you have a better solution, Please let me know. Thanks a lot.
-
Problem when reading DBF filesHi Kiran Kumar Singani, Thanks for your answer The ConnectionString I'm using is "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " + directoryName + "; Extended Properties=dBASE IV; User ID=; Password=;" It just works fine with all dbf files that has the length of filename less than or equal to 8. Thanks again
-
Problem when reading DBF filesHi all, I've got a small problem when i tried to read DBF files. I'm using OleDb provider. The problem is i just could read dbf files that have the length of filename which are less than or equal to 8 (not including extension). I can't understand this. Thanks a lot
-
Paging search resultI'm creating a functionality of searching in my web project. The search result will be returned with many records and i want to do paging to the search result. So where could i store the search result to do paging Actually i'm storing the search query in session object and each time a user click the next page, i will execute the search stored in the session object with new page index. Is it feasble? Thanks
-
Where to store search resultI'm creating a searching functionality of my project. When the result including many records is returned, i want to do paging with the result so where should i store the result to do that, in the session, viewstate or in the database. Actually, instead of storing the result of search, i store the searching query in the wiewstate and each time a user clicks next page button, i execute the searching query from the viewstate with new page index. Thanks
-
Missing fileswhen i started my ASP.NET project, it reported errors: assembly CrystalDecision missing or something like that how to resolve this problem thanks
-
Template ColumnI want to add a TemplateColumn( TextBox ) into a datagridcell. I just can add a textbox into a datagridcell but don't know how to do that with templatecolumn Thanks
-
Problem with getting textbox valuewhen i pressed button add, the following code would add a text box to datagrid TextBox txtEdit = new TextBox(); dgTest.Items[0].Cells[0].Controls.Add( txtEdit ); After that i pressed button delete, the following would remove the textbox from datagrid TextBox txtEdit = ( TextBox ) dgTest.Items[0].Cells[0].FindControl("txtEdit"); // lblTest.Text = txtEdit.Text dgTest.Items[0].Cells[0].Controls.Remove( txtEdit ); What i can not understand is that it removed the textbox sucessfully that means it could find the textbox but it can't not get the text that i typed in the textbox Thanks
-
CounterIt's AutoIncrement Field Thanks
-
CounterCan we restart the counter in SQL Server If we can, how can we do it Thanks