|
Hi to everyone!
I have one problem, when I want to make an update to some record in the table, I am entering the data for it, and instead just for one field, the UPdateCommand is putting the same data in all the fields. Example:
I have two fields: ID and Name. And I am making an update of the name, and it's changed all the data for all the fields under Name. I think that I should use some WHERE statement, but I am beginner in SQL and every help will be appreciated. Thx
Example, before update, I had:
ID:1
Name:a
------------
ID:2
Name:b
-----------After update-------------
Update name: "c"
ID:1
Name:c
------
ID:2
Name:c
-------
|
|
|
|
|
you should use
WHERE ID=<your desired="" id="">
|
|
|
|
|
If you donot mention the where clause it updates all the records in a table.
Do good and have good.
|
|
|
|
|
Hi! I want to insert data in the detailsview, and I set my InsertCommand like:
InsertCommand="INSERT INTO name FROM [tblname]" and it gives me mistake: Incorrect syntax near the keyword 'FROM'.
Any help? Thanks
|
|
|
|
|
one more thing: I already solved, but when I am putting this syntax:
INSERT INTO tblname(name) VALUES ('')
it gives me blank field, and what should I do, so the VALUES will fill the name field with data. Thanks
|
|
|
|
|
I solved.
|
|
|
|
|
I am developing a database driven application. I would like to have any insert done by user to be added to the record for security purposes.the problem is having the person logged in pick data from the users table to the inserted record because all users are using the same database with same credentials. Only developed users table in this database
Give the world the best you have, And the best will come your Way
|
|
|
|
|
Hi Xerox4,
Can you please explain your question in brief? I can't understand it properly.
|
|
|
|
|
Hi! I have a database connected with web, and I want the ID field to be fill automatically, like for example I have: ID, user, pass. I will fill the user and pass fields, and the ID field to be filled like with autonumber, incremented by 1.
Thx, Angel
|
|
|
|
|
So, set the column to be an identity field. Am I missing something ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I can't see any option for setting the field of type identity, should i do that with some query. I am new in SQL, thx ahead
|
|
|
|
|
in sql server for numeric feilds you will find the option for indentity property
set this to yes then you have to set the identity seed which is any number from where you want to start the autonumbering and indentity seed the increment to want in each record.
Yogesh Agarwal
|
|
|
|
|
Create table tblname<br />
( id int identity(1,1))
the first standing for the starting number and the second for the increment
Give the world the best you have, And the best will come your Way
|
|
|
|
|
I'm Working with SSRS-2005 Reports in C# Web Applications..
I'm having One Doubt regarding Division..
In Chart Control (Pie-Chart Type)
(Properties--> Data--> Values--> (Select Edit)--> EditChartValues--> PointLabels-->Label-Expression)
I'm Using the Following expression..
=Floor((Fields!Price.Value*100)/Sum(Fields! CPU.Value, "DataSet1_AmountDetails")) & "%"
In Chart Control(Pie-Chart Type).. I'm getting Output as..
10%, 15%, 12%, 7%, 27%, 14%, 14% ...
If I'm Using the Following Expression in Chart Control (ie I'm Not Including FLOOR here)..
=((Fields!Price.Value*100)/Sum(Fields!CPU.Value, "DataSet1_AmountDetails")) & "%"
In Chart Control(Pie-Chart Type).. I'm getting Output as..
10.2564789456%, 15.457893652145%, 12.877895632%, 7.9845678987%, 27.12348532%, 14.6547863254%, 14.7550103026% ...
Even I Used ROUND Instead of FLOOR in My expression..
I'm getting my Output as..
10%, 15%, 13%, 8%, 27%, 15%, 15%..
which gives me the Total Percentage is More than 100%.. I want to show my Reports for Only 100%...
This is the Problem i'm facing when i'm Using Round
---------------------------------------------------------------------------------------------------------------
But I Want the OutPut as
10.25%, 15.45%, 12.87%, 7.98%, 27.12%, 14.65%, 14.75%...
How can I do this... Please give me the Suggestions for doing this...
Thank You..
|
|
|
|
|
Specify the number of dps you want to round to. With SSRS, I think the number of dps to round to is passed as the 2nd argument to the Round() function.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thank You for Replying Me..
How to do this..
This is the Expression i'm using for Round..
=Round((Fields!Price.Value*100)/Sum(Fields! CPU.Value, "DataSet1_AmountDetails")) & "%"
Now how can I specify the Number of dps to round..
|
|
|
|
|
I already told you how to do this.
SSRS provides intellisense for expressions, so you should be able to see what arguments a function accepts.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
I am trying to generate a report which has 10 parameters. All the parameters are set using the Report parameter option in The Report menu.
When the report starts processing i want a msgbox which asks
"Do U want to change any Parameter values"
If yes then i need the report to stop rendering Else continue with the processing.
I 've got the Msgbox done but i don't know how to stop rendering the report.
Plz Help?
Thanks & regards,
Payal
|
|
|
|
|
You can't do this. You should collect parameter information before attempting to render the report.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello everyone!
I stuck with problem. I wrote managed IFilter based on a code from Stephen Toub, stoub@microsoft.com and pattern for IFIlter written by Richard Heinrich, Palissimo GmbH
So far this filter works fine with Microsoft Desktop engine
But when I'm tring ot regiter this filter for SQL Server 2005 I have problem with index process
Thank's log for this process
2008-03-03 14:51:53.77 spid16s The full-text catalog monitor reported catalog "TestFilter" (5) in database "pressdisplay_ftsearch" (10) in REINITIALIZE state. This is an informational message only. No user action is required.
2008-03-03 14:51:53.78 spid18s Informational: Full-text Auto population initialized for table or indexed view '[pressdisplay_ftsearch].[dbo].[Test]' (table or indexed view ID '5575058', database ID '10'). Population sub-tasks: 1.
2008-03-03 14:52:13.83 spid16s The full-text catalog health monitor reported a failure for full-text catalog "TestFilter" (5) in database "pressdisplay_ftsearch" (10). Reason code: 0. Error: 0x800706bf(The remote procedure call failed and did not execute.). The system will restart any in-progress population from the previous checkpoint. If this message occurs frequently, consult SQL Server Books Online for troubleshooting assistance. This is an informational message only. No user action is required.
2008-03-03 14:52:15.78 spid14s Informational: Reinitialized full-text Auto population for table or indexed view '[pressdisplay_ftsearch].[dbo].[Test]' (table or indexed view ID '5575058', database ID '10') after a temporary failure. Prior to error, the number of documents processed: 0, errors encountered: 0.
2008-03-03 14:54:51.80 spid24s Error '0x8004fd0b: The filter has caused a sharing violation.' occurred during full-text index population for table or indexed view '[pressdisplay_ftsearch].[dbo].[Test]' (table or indexed view ID '5575058', database ID '10'), full-text key value 0x00000001. Attempt will be made to reindex it.
2008-03-03 14:54:51.80 spid24s The component 'MSFTE.DLL' reported error while indexing. Component path 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\MSFTE.DLL'.
Does anyone have any idea how to register SQL Filter properly
Thanks
Alex Ovchinnikov
|
|
|
|
|
have 500 sps and some of them have select statements in it...
i want to take the count of this select statements excluding the commented ones..
is there any query for that?..
or hoe can i get the count of the select statements in sps in my database
is there any regular expression to do this..
i am using mssql 2005 and 2000.
thanks in advance
|
|
|
|
|
hi to everyone! I have this problem, when I want to bind a data to label, i am going with:
Label1.Databindings.Add("Text", dataset1, "informations.username");
and i get this mistake:System.Web.UI.WebControls.Label' does not contain a definition for 'Databindings'
Any help? Thanks
|
|
|
|
|
Hi! I have one issue and I am sure that many guys here know how to help me. I am building a web application in ASP.NET with C#, and now I have a dropdownlist connected to the field in the database, and I have a label, and I want to display other value from the database there. Like, I am selecting my name in the dropdown list, and in the label it should display my second name. Thanks ahead
|
|
|
|
|
Hi
To do the same the simplest way is use Selected Value property. At the time to binding the combobox you could assign the Display member property with your First name field and the value member property with your last name feild.
Then in combobox event you could choose the item displayed due to display member property and set the text of selected value property according to the member you choosen.
Yogesh Agarwal
|
|
|
|
|
Hi All,
I am working with a database project. I want to know how to create, access and manipulate SQL database provide inside VS.net.
I created but not working properly.
I having another doubt weather if we use the vs.net providing sql, their is no need to install sql for the client system while deploying???
Clear me.. this doubts.
Thanks in advance
Senthil.S
Senthil S
Software Engineer
|
|
|
|