|
I am assuming that I would need to create a one-to-one column relationship with the server table columns, however, for the apps, users, and websites, would I create a memo/text field and then concatenate all of the entries to show in there?
I am not as familiar with the intricacies of SQL and using stored procedures to get something like this done.
|
|
|
|
|
Hi Jon
Your problem can most-easily be solved at a presentation-level, rather than at a SQL level. Under MS-Access, you would define a report that lists just your servers. Then embed 3 sub-reports (for each of your other tables) linking to the server. Most other reporting tools offer similar sub-report facilities.
If you do need to solve it using SQL-Server then your will need to use a stored procedure and a bunch of cursors.
Regards
Andy
|
|
|
|
|
Actually, this makes much more sense. I don't have to do it in SQL. I just need the information in a format that is easily read and makes the most sense for the project.
|
|
|
|
|
Hi,
How do I get the diagrams to print smaller on a page? It's those diagrams that display the tables with their relations to other tables. Currently the tables are printed huge and there is a lot of white space in between.
Are there any better 3rd party tools that can create better diagrams?
Regards,
Brendan
|
|
|
|
|
.NET Enthusiast wrote: Currently the tables are printed huge and there is a lot of white space in between.
Have you tried rearranging them closer together?
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
Hi,
I have searched Google for performance tips but didn't find many because I didn't understand. If any one has a good readable topics please forward it to me.
If I changed int to smallint can this also result in better performance?
Thanks
Brendan
|
|
|
|
|
Hi Brendan
Changing an "int" to a "smallint" is unlikely to make much of a difference.
Putting decent indexes in place will normally yield a quick-win for performance.
Pete O'Hanlon put together these articles[^] about performance optimisation.
Regards
Andy
|
|
|
|
|
I want to know which stored procedures are executed in the last 24 hour in my database and i wish if i could also know about the program who called the stored procedure?
OR
I can know about a specific stored procedure that when it was executed last time and by which program?
Please help...its urgent?
Regards,
Zeeshan Malik
-- modified at 12:21 Monday 26th November, 2007
To do what can be done is a Intelligent Job and to do what should be done is a Genious Job
done is a Genious Job
|
|
|
|
|
You need to look at using SQL Profiler to identify what's going on down at the database level. It won't tell you exactly which program calls the SQL, but it will tell you what SQL is hitting the database and who is doing it? Take a look at this[^] article for details.
Now a request - please don't put it's urgent in a post. They are all urgent to somebody, and this doesn't help anybody.
|
|
|
|
|
hi all,
Is it possible to install SQL Server 2000 on Vista Home Premium ? coz whenever I go to install it on my laptop pre-installed with Vista Home Prem, at certain point in insatllation process it isays "Windows installer has stopped working" and there after, the insatllation exits, whereas on my XP machine it installs just fine ? plz help?
|
|
|
|
|
|
thanks man...atleast now i know for sure that no matter what i do, i wont be able to install SQL SErver 2000 atleast on Windows Vista.
well, i do have another query, if u could help me with this, Is there any problem if i go to format the hard disk and install Windows XP instead of Windows Vista on my laptop? actually my laptop came with Windows Vista Home Premium pre-installed, but due to some application compatibility issues i want to remove that and install XP.
Can i go ahead with the regular process of installing an OS or is there any special care I need to take? Plz help
|
|
|
|
|
hi i am using asp.net 2005 to create an website which handles data from ms sql.
i am trying to create an stored procedure which would call an function from the asp.net function when an event(e.g when data in an perticular table is changed) i have read some tutorials on stored procedure however they dont really cover what i need
so could anyone help me? maybe some good tutorial recommandation or source code or recommandation?
|
|
|
|
|
neodeaths wrote: i am trying to create an stored procedure which would call an function from the asp.net function when an event(e.g when data in an perticular table is changed)
This doesn't make sense. You want to write a proc which calls code in your ASP.NET app ? You can define a trigger, and you can use managed code in SS2005, but even then, the code is going to be atomic, I doubt it can fire events in your code, especially as, in an ASP.NET app, the class instances that exist change every time a page is loaded, and are active only while it is being created.
Perhaps if you try to explain a little better ?
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 )
|
|
|
|
|
hi i am using vs 2005 and doing an asp.net website
i created a basic db and drag and drop the table into my web page until now it works fine
however i realise that everytime i change the table infomation the web site table which is displaying the db infomation does not refresh
hence i am trying to find a way to resolve this issue.
please voice ur suggestio and opinion to me
|
|
|
|
|
The DataGrid or DataGridView display object is not connected directly to the underlying table. If you want the underlying database table to be updated when the displayed content is updated (and this is not generally a good idea - not efficient and it makes UNDO-ing a change more difficult) you will need to create event handlers (TextChanged?) and write the appropriate Database updates.
It sounds like you may need a little more information on how to use databases with .NET. Connecting to a Database from .NET is not a complicated thing to do, but you will need to be cognizant of the type of operation (SELECT, UPDATE, INSERT, DELETE) that you are trying to do, and the relationships between the objects.
Try reading these articles, and see if it helps your understanding or if you can rephrase your request. (Search for ADO.NET)
http://www.codeproject.com/cs/database/DatabaseAcessWithAdoNet1.asp
http://www.codeproject.com/dotnet/ADONETOOP.asp
BDH
|
|
|
|
|
Hi.,
My Code is like this....,
string s1 = "select Module from Employee where CProject=@id2 and Designation='Team Lead'";
OleDbCommand cmd1 = new OleDbCommand(s1, con);
cmd1.Parameters.Add("@id2", OleDbType.VarChar);
cmd1.Parameters["@id2"].Value = DropDownList3.SelectedValue;
OleDbDataReader dr1;
dr1 = cmd1.ExecuteReader(); I am getting that Error here
while (dr1.Read())
{
DropDownList4.Items.Add(dr1.GetString(0));
}
Plz Help me...,
Regards.,
Deepak.
|
|
|
|
|
i want to add a autonumber field to database. How to achive this? Please help me?
Kiran Sajanikar
Kiran Sajanikar
|
|
|
|
|
1. Create a Field in table into the sql server and apply the primary key to that field.
2.Give column identity = yes, identity speed = 1 and identity increment = 1
|
|
|
|
|
Thanx
Kiran Sajanikar
Pune.
|
|
|
|
|
Hi
Can anybody help me to list the stored procedure parameters and return type in sql server 2005/2000 for a given stored procedure.
For ex:
Parameter_Name Data_Type Length
---------------------------------
kesavan
|
|
|
|
|
Here it is a version (displays from master database the parameters name, type and length for sp_addserver stored procedure):
-- SQL 2000/2005
if exists (select * from syscolumns where id = object_id('sp_addserver'))
begin
select
name
, type_name(xusertype)
, length
from syscolumns where id = object_id('sp_addserver')
end
-- SQL 2005
if exists (select * from sys.all_parameters where object_id = object_id('sp_addserver'))
begin
select
name
, type_name(user_type_id)
, max_length
from sys.all_parameters where object_id = object_id('sp_addserver')
end
Cristian
Nuclear launch detected
|
|
|
|
|
Hello if anyone can please give me just a tiny sample of how I'd do this, not just what to do I will be so grateful.
Just so you know. I have been googling for days on this and I'm not sure what to do as I am still pretty new to c#.
This is what I want to do. I have a dataset and datagrid(search results table) displaying results like this.
Siann Skills1
Siann Skills2
Siann Skills3
I want it to show this
Siann Skills1,Skills2,Skills3.
I have my select statement, then I have created a new datacolumn as I was told to do as below. Now after that, what do I do? How do I get all the skills in one column. I know I have to concatenate, and I have tried searching the net, but I can't find anything useful. is there any possibility for an example?
dgSearchResults.Columns.Add(new DataColumn("skills", GetType()));
I then have my foreach. I need to put something in the foreach.
foreach (DataSet1.EmpSkillsRow empskillsRow in empskillsDT.Rows)
{
}
I was told on the C# forum to try here. I am not using sql 2005 so I can't use cte.
|
|
|
|
|
Thats retarded that they told you to ask here...
Try this and forgive VB, I have been stuck in VB land for too long and can no longer do c# from memory.
<br />
Dim ds as New DataSet() 'substitute your data set<br />
Dim dt as DataTable = ds.Tables(0) 'substitute your data table<br />
Dim dr as DataRow<br />
<br />
Dim strColumnAValue as String = String.Empty<br />
Dim strColumnBValues as New StringBuilder()<br />
<br />
For Each dr in dt.Rows<br />
If (Convert.ToString(dr(0)) = strColumnAValue) Then 'we are working on the same user "Siann" in this case and will append values<br />
strColumnBValues.Append(Convert.ToString(dr(1)).Trim() & ",")<br />
<br />
Else 'You are working on a new person and not "Siann"<br />
If strColumnBValues.Length <> 0 Then 'there is a user/ skillset to write out<br />
strColumnBValue = strColumnBValue.Remove(strColumnBValue.ToString().LastIndexOf(","), 1) 'remove the last comma<br />
Console.Writeline("User: " & strColumnAValue & " - Skills: " & strColumnBValues.ToString()) 'write out the value<br />
strColumnBValues.Length = 0 'clear the string builder<br />
strColumnAValue = Convert.ToString(dr(0)) 'set the new column A Value<br />
strColumnBValues.Append(Convert.ToString(dr(1)).Trim() & ",") 'add the first value<br />
End If<br />
End If<br />
<br />
<br />
<br />
Next 'dr<br />
<br />
|
|
|
|
|
I am in SQL server
Say i entered a statement, though didn't finish it, i get:
mysql> SELECT id, size, color, quantity FROM product WHERE size = 'One size fits
'>
'>
'>
'>
'>
'>
'>
'>
what is the command to exit this unfinished statement and get back to the mysql> prompt? I know it if very simple, like backslash something. I went through the whole alphabet front a backslash, and still so success. Must finish this homework assignment.
|
|
|
|