Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Friday, March 23, 2012

how can I populate data in a one-to-one relationship

Here is what I have and (somewhat understand). I'm using Visual WebDeveloper 2005 Express Edition and have setup my application to use form authentication(which automatically creates the ASPNETDB.MDF file with several default tablesand views). I'm using the CreateUserWizardwhich is fine…but I need to collect additional information like (firstname,lastname, address…and on..). What I'vedone. I've created a tabled namedUserProfile and set UserId as the primary key (uniqueidentifier). I then setup a 1-to-1 relationshipbetween aspnet_Users and UserProfile (which I think is correct). On my UpdateContactInfo.aspx page (whereusers go to update their personal information) I use a hidden label control(UserValue) to receive the UserId during the page_load event as below:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
UserValue.Text = Membership.GetUser().ProviderUserKey().ToString()
End Sub

Now with the UserID available I need to populate theUserProfile table with the UserId, firstname, lastname, address of thecurrently logged in user. How can I do this and am I on theright track..?

Then you can use a SqlCommand to issue the insert command to the UserProfile anywhere you like in your code:

using (SqlConnection conn= new SqlConnection(@."Data Source=(local);Integrated Security=SSPI;Database=mydb;");
{
connection.Open();

SqlCommand cmd = new SqlCommand("insert into UserProfile select @.UserId, @.firstname, @.lastname, @.address", conn);
cmd.Parameters.Add("@.UserId", SqlDbType.UniqueIdentifier);
cmd.Parameters["@.UserID"] = UserValue.Text;
//add all parameters and set their values
cmd.ExecuteNonQuery();
conn.Close();

}

|||

Why aren't you using the built-in profile system?

Why are you setting a hidden form field (Which can be spoofed) to store the userid, instead of a session variable or just looking it up when you want to do the update?

|||How do I go about retrieving the current user's [UserId] information from the session variable? And what is stored inside the session variable by default. Also... I've done some reading on the built-in profile system and have walked through the [ASP.NET HOW DO I Video Series: Profiles and Themes ] . My next question is...what if I wanted to store items in my profile that is not of type: string. So far all the property values that have been stored in the profiles table are all storing as type: string. I would like to store some of these properties as an integer type.|||

The profile can store anything that can be automaticlly converted to and from a string (That includes datetime, integer, float, decimal, and a lot of other obejcts).

You can retrieve the state of the session variable in a sqldatasource by selecting the parameter as type "Session" and the sessionkey of whatever you used.

In code after authentication, for example, put this code:

Session("UserID")=membership.getuser().whatever (Sorry, I forget the exact syntax)

Then in sqldatasource, the parameter type is session, with the key being "UserID".

|||Thanks for all the help! I'm now using the profile to store user information (firstname, lastname, age, address...). However I think I've ran into another problem :( Becuase the profile date is stored in a serialized format blob... I cant easily query the database and perform common sql routines. I would like to display all users and their profile data within a gridview but can't figure how to do that. I've read the TableProfileProvider how-tohttp://www.asp.net/sandbox/samp_profiles.aspx?tabindex=0&tabid=1 but the source code is not in VB.NET. Can someone advise... thanks.|||

I had to write my own T-SQL function to pull out profile properties from the blobified format. Not elegant, and definately not fast. You would probably be better off pulling back usernames in a dataset, then calling the membership object to pull the properties and appending them to the dataset, then binding that to the datagrid.

I wish I had time to finish my profile provider. Unfortunately, I've been to busy to go back to revist it since my deblobify function works ok for what I needed at the time. If you want to use the TableProfileProvider, you should be able to compile it into a dll, then reference it from within your VB.NET web application just fine. But I haven't tried it, as I usually just convert stuff from C# to VB myself, and leave it as source in the project.

How can I Pass an array into a Stored Procedure from Visual Basic?

Hi
How can I Pass an array into a MS SQL Server Stored Procedure from Visual
Basic?
Thanks
IanConvert it into a string
"Ian" <ian@.NoWhere.com> wrote in message
news:u8f3g1U2EHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hi
> How can I Pass an array into a MS SQL Server Stored Procedure from Visual
> Basic?
> Thanks
> Ian
>|||Define what you mean by an array and what you want to do with it in the
stored procedure for better answers.
--
----
Louis Davidson - drsql@.hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design -
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are interested in
consulting services. All other replies may be ignored :)
"Ian" <ian@.NoWhere.com> wrote in message
news:u8f3g1U2EHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hi
> How can I Pass an array into a MS SQL Server Stored Procedure from Visual
> Basic?
> Thanks
> Ian
>|||There are no array type in t-SQL. You will have to use other workarounds
like changing your VB array to a delimited string & pass as a single
parameter to the procedure, or build an XML string etc. As far as dealing
with such parameters & parsing them within a stored procedure, you can get
some ideas from: http://www.sommarskog.se/arrays-in-sql.html
--
Anith|||CREATE Procedure sp_test_array
@.IDList Varchar(8000)
AS
-- Notes: @.IDList must be a comma delimited list of id's
SET NOCOUNT ON
DECLARE @.Pos1 Int, @.Pos2 Int, @.id Int
-- Input value - bracket with commas
SET @.IDList = ',' + @.IDList + ','
SET @.Pos1 = 1
WHILE @.Pos1 < Len(@.IDList)
BEGIN
SET @.Pos2 = Charindex(',' , @.IDList , @.Pos1 + 1)
SET @.id = Convert(Int, Substring(@.IDList, @.Pos1 + 1, @.Pos2 - @.Pos1 - 1))
PRINT @.id
SET @.Pos1 = @.Pos2
END

How can I Pass an array into a Stored Procedure from Visual Basic?

Hi
How can I Pass an array into a MS SQL Server Stored Procedure from Visual
Basic?
Thanks
Ian
Convert it into a string
"Ian" <ian@.NoWhere.com> wrote in message
news:u8f3g1U2EHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hi
> How can I Pass an array into a MS SQL Server Stored Procedure from Visual
> Basic?
> Thanks
> Ian
>
|||Define what you mean by an array and what you want to do with it in the
stored procedure for better answers.
Louis Davidson - drsql@.hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design -
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are interested in
consulting services. All other replies may be ignored
"Ian" <ian@.NoWhere.com> wrote in message
news:u8f3g1U2EHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hi
> How can I Pass an array into a MS SQL Server Stored Procedure from Visual
> Basic?
> Thanks
> Ian
>
|||There are no array type in t-SQL. You will have to use other workarounds
like changing your VB array to a delimited string & pass as a single
parameter to the procedure, or build an XML string etc. As far as dealing
with such parameters & parsing them within a stored procedure, you can get
some ideas from: http://www.sommarskog.se/arrays-in-sql.html
Anith
|||CREATE Procedure sp_test_array
@.IDList Varchar(8000)
AS
-- Notes: @.IDList must be a comma delimited list of id's
SET NOCOUNT ON
DECLARE @.Pos1 Int, @.Pos2 Int, @.id Int
-- Input value - bracket with commas
SET @.IDList = ',' + @.IDList + ','
SET @.Pos1 = 1
WHILE @.Pos1 < Len(@.IDList)
BEGIN
SET @.Pos2 = Charindex(',' , @.IDList , @.Pos1 + 1)
SET @.id = Convert(Int, Substring(@.IDList, @.Pos1 + 1, @.Pos2 - @.Pos1 - 1))
PRINT @.id
SET @.Pos1 = @.Pos2
END

How can i onnect Visual Basic Express 2005 to a remote SQL Server Express 2005?

Hi

Im trying to connect Visual Basic Express 2005 to a remote SQL Server Express 2005. I cant find how i can do that in VB.net Express.
In Web developer there are no problem to connect to a remote SQL server but i cant find it in VB.net Express.

The XP with the SQL server that i want to connect to is on the local network.

Greatful for help!

You may check this link:

http://msdn.microsoft.com/vstudio/express/vb/features/data/

If you need a admin tool for the SQL Express databases, you can dowload Management Studio Express from here:

http://msdn.microsoft.com/vstudio/express/sql/download/default.aspx

sql

Monday, March 12, 2012

How can I install SQL Server 2005 Developer Edition''s Management Studio on a desktop machine?

I have installed Visual Studio 2005 Prof Edition on a Vista machine and SQL Server 2005 Developer Edition on a Windows 2000 server. They will be used as a development environment for us. As we need to management the SQL Server 2005, we would like to install the 2005 Developer SSMS on the Vista machine such that we can manage the SQL Server 2005 developer instance installed on that Win2k machine. However, the system does not allow us to do it. We have the express edition autoamtically installed while we installed the Vistual Studio. Is there any workaround that i can still install the 2005 developer SSMS without uninstall the sql server 2005 Xpress version? Or, I have to uninstall the Xpress version before i can install the 2005 developer's SSMS? Please help!

All VS2005 pro comes with free SQL Server 2005 developer edition so you can install one in each Vista and do the needed configuration of enabling browser service, and enabling both TCP/IP and Named Pipes in configuration Manager and use the Surface Area Configuration tool to allow both local and remote and allow TCP/IP and Named Pipes. While you are at it also configure mixed Authentication so all developer can register each other SQL Server and access all in one place.

Another option is to uninstall Express and use Express Advanced that comes with Management Studio.


http://www.microsoft.com/downloads/details.aspx?familyid=5B5528B9-13E1-4DB9-A3FC-82116D598C3D&displaylang=en


|||

Thanks for the reply. My question probably not clear for what we're trying to do. Actually, we are trying to install an instance of SQL Server 2005 Developer Edition (whcih come with Visual Studio Developer Edition into a machine running Windows 2000 SP4). And then I installed the Visual Studio 2005 professional edition into my company which is running on a Vista version Ultimate. Both installation success without any big problem. However, I would like to be able to manage that SQL Server 2005 Developer edition which installed in that Windows 2000 server through my local computer (Windows Vista with Visual Studio 2005 Prof installed). The problem is, there is a SQL Server 2005 Express edition installed into my computer (Vista) when I installed teh Visual Studio. And now, I tried to install the Sql Server Mangement Studio from SQL SErver 2005 Developer edition into my Vista machine, the system doesnt allow me to do it. So, do i have to uninstall the express edition in my local computer (vista) and then install the SSMS from the SQL Server 2005 Developer edition disc? Or, there's somoe other work around that it will allow me to install the SSMS from SQL Server 2005 Developer edition and the same time, keep the 2005 Express edition running in my local computer system. My reason is, the SSMS is just a management tools, it shouldnt depends on what version of DB engine installed into my local computer. Anyone please help

|||

I am one of the people who got the SQL Server developer edition price down from $450 to $50 list so I don't think such strange uses is valid. However you can uninstall the standard Express and use the Advanced which is also free and comes with most features of the full product including Management Studio. But you still have to do what I have explained in my first post because Express and the Developer edition comes with most services disabled.

|||

ic.. so uninstall the pre-installed sql server express from my computer (which has the visual studio 2005 prof edition installed) wont affect my visual studio 2005, right? Just want to make sure before i uninstall anything Smile sorry about the noob question..

|||

Actually Microsoft now let you download the Management Studio for standard Express so download it below and install it. This link also gives you features compare of the Advanced and the Standard Express. But remember you have to go back and use my remote connection instruction. Hope this helps.

http://msdn2.microsoft.com/en-us/express/bb410792.aspx

How can I install SQL Server 2005 Developer Edition''s Management Studio on a desktop machine?

I have installed Visual Studio 2005 Prof Edition on a Vista machine and SQL Server 2005 Developer Edition on a Windows 2000 server. They will be used as a development environment for us. As we need to management the SQL Server 2005, we would like to install the 2005 Developer SSMS on the Vista machine such that we can manage the SQL Server 2005 developer instance installed on that Win2k machine. However, the system does not allow us to do it. We have the express edition autoamtically installed while we installed the Vistual Studio. Is there any workaround that i can still install the 2005 developer SSMS without uninstall the sql server 2005 Xpress version? Or, I have to uninstall the Xpress version before i can install the 2005 developer's SSMS? Please help!

All VS2005 pro comes with free SQL Server 2005 developer edition so you can install one in each Vista and do the needed configuration of enabling browser service, and enabling both TCP/IP and Named Pipes in configuration Manager and use the Surface Area Configuration tool to allow both local and remote and allow TCP/IP and Named Pipes. While you are at it also configure mixed Authentication so all developer can register each other SQL Server and access all in one place.

Another option is to uninstall Express and use Express Advanced that comes with Management Studio.


http://www.microsoft.com/downloads/details.aspx?familyid=5B5528B9-13E1-4DB9-A3FC-82116D598C3D&displaylang=en


|||

Thanks for the reply. My question probably not clear for what we're trying to do. Actually, we are trying to install an instance of SQL Server 2005 Developer Edition (whcih come with Visual Studio Developer Edition into a machine running Windows 2000 SP4). And then I installed the Visual Studio 2005 professional edition into my company which is running on a Vista version Ultimate. Both installation success without any big problem. However, I would like to be able to manage that SQL Server 2005 Developer edition which installed in that Windows 2000 server through my local computer (Windows Vista with Visual Studio 2005 Prof installed). The problem is, there is a SQL Server 2005 Express edition installed into my computer (Vista) when I installed teh Visual Studio. And now, I tried to install the Sql Server Mangement Studio from SQL SErver 2005 Developer edition into my Vista machine, the system doesnt allow me to do it. So, do i have to uninstall the express edition in my local computer (vista) and then install the SSMS from the SQL Server 2005 Developer edition disc? Or, there's somoe other work around that it will allow me to install the SSMS from SQL Server 2005 Developer edition and the same time, keep the 2005 Express edition running in my local computer system. My reason is, the SSMS is just a management tools, it shouldnt depends on what version of DB engine installed into my local computer. Anyone please help

|||

I am one of the people who got the SQL Server developer edition price down from $450 to $50 list so I don't think such strange uses is valid. However you can uninstall the standard Express and use the Advanced which is also free and comes with most features of the full product including Management Studio. But you still have to do what I have explained in my first post because Express and the Developer edition comes with most services disabled.

|||

ic.. so uninstall the pre-installed sql server express from my computer (which has the visual studio 2005 prof edition installed) wont affect my visual studio 2005, right? Just want to make sure before i uninstall anything Smile sorry about the noob question..

|||

Actually Microsoft now let you download the Management Studio for standard Express so download it below and install it. This link also gives you features compare of the Advanced and the Standard Express. But remember you have to go back and use my remote connection instruction. Hope this helps.

http://msdn2.microsoft.com/en-us/express/bb410792.aspx

How can I install SQL Server 2005 Developer Edition''s Management Studio on a desktop machine?

I have installed Visual Studio 2005 Prof Edition on a Vista machine and SQL Server 2005 Developer Edition on a Windows 2000 server. They will be used as a development environment for us. As we need to management the SQL Server 2005, we would like to install the 2005 Developer SSMS on the Vista machine such that we can manage the SQL Server 2005 developer instance installed on that Win2k machine. However, the system does not allow us to do it. We have the express edition autoamtically installed while we installed the Vistual Studio. Is there any workaround that i can still install the 2005 developer SSMS without uninstall the sql server 2005 Xpress version? Or, I have to uninstall the Xpress version before i can install the 2005 developer's SSMS? Please help!

All VS2005 pro comes with free SQL Server 2005 developer edition so you can install one in each Vista and do the needed configuration of enabling browser service, and enabling both TCP/IP and Named Pipes in configuration Manager and use the Surface Area Configuration tool to allow both local and remote and allow TCP/IP and Named Pipes. While you are at it also configure mixed Authentication so all developer can register each other SQL Server and access all in one place.

Another option is to uninstall Express and use Express Advanced that comes with Management Studio.


http://www.microsoft.com/downloads/details.aspx?familyid=5B5528B9-13E1-4DB9-A3FC-82116D598C3D&displaylang=en


|||

Thanks for the reply. My question probably not clear for what we're trying to do. Actually, we are trying to install an instance of SQL Server 2005 Developer Edition (whcih come with Visual Studio Developer Edition into a machine running Windows 2000 SP4). And then I installed the Visual Studio 2005 professional edition into my company which is running on a Vista version Ultimate. Both installation success without any big problem. However, I would like to be able to manage that SQL Server 2005 Developer edition which installed in that Windows 2000 server through my local computer (Windows Vista with Visual Studio 2005 Prof installed). The problem is, there is a SQL Server 2005 Express edition installed into my computer (Vista) when I installed teh Visual Studio. And now, I tried to install the Sql Server Mangement Studio from SQL SErver 2005 Developer edition into my Vista machine, the system doesnt allow me to do it. So, do i have to uninstall the express edition in my local computer (vista) and then install the SSMS from the SQL Server 2005 Developer edition disc? Or, there's somoe other work around that it will allow me to install the SSMS from SQL Server 2005 Developer edition and the same time, keep the 2005 Express edition running in my local computer system. My reason is, the SSMS is just a management tools, it shouldnt depends on what version of DB engine installed into my local computer. Anyone please help

|||

I am one of the people who got the SQL Server developer edition price down from $450 to $50 list so I don't think such strange uses is valid. However you can uninstall the standard Express and use the Advanced which is also free and comes with most features of the full product including Management Studio. But you still have to do what I have explained in my first post because Express and the Developer edition comes with most services disabled.

|||

ic.. so uninstall the pre-installed sql server express from my computer (which has the visual studio 2005 prof edition installed) wont affect my visual studio 2005, right? Just want to make sure before i uninstall anything Smile sorry about the noob question..

|||

Actually Microsoft now let you download the Management Studio for standard Express so download it below and install it. This link also gives you features compare of the Advanced and the Standard Express. But remember you have to go back and use my remote connection instruction. Hope this helps.

http://msdn2.microsoft.com/en-us/express/bb410792.aspx

How can I install SQL Server 2005 Developer Edition''s Management Studio on a desktop machine?

I have installed Visual Studio 2005 Prof Edition on a Vista machine and SQL Server 2005 Developer Edition on a Windows 2000 server. They will be used as a development environment for us. As we need to management the SQL Server 2005, we would like to install the 2005 Developer SSMS on the Vista machine such that we can manage the SQL Server 2005 developer instance installed on that Win2k machine. However, the system does not allow us to do it. We have the express edition autoamtically installed while we installed the Vistual Studio. Is there any workaround that i can still install the 2005 developer SSMS without uninstall the sql server 2005 Xpress version? Or, I have to uninstall the Xpress version before i can install the 2005 developer's SSMS? Please help!

All VS2005 pro comes with free SQL Server 2005 developer edition so you can install one in each Vista and do the needed configuration of enabling browser service, and enabling both TCP/IP and Named Pipes in configuration Manager and use the Surface Area Configuration tool to allow both local and remote and allow TCP/IP and Named Pipes. While you are at it also configure mixed Authentication so all developer can register each other SQL Server and access all in one place.

Another option is to uninstall Express and use Express Advanced that comes with Management Studio.


http://www.microsoft.com/downloads/details.aspx?familyid=5B5528B9-13E1-4DB9-A3FC-82116D598C3D&displaylang=en


|||

Thanks for the reply. My question probably not clear for what we're trying to do. Actually, we are trying to install an instance of SQL Server 2005 Developer Edition (whcih come with Visual Studio Developer Edition into a machine running Windows 2000 SP4). And then I installed the Visual Studio 2005 professional edition into my company which is running on a Vista version Ultimate. Both installation success without any big problem. However, I would like to be able to manage that SQL Server 2005 Developer edition which installed in that Windows 2000 server through my local computer (Windows Vista with Visual Studio 2005 Prof installed). The problem is, there is a SQL Server 2005 Express edition installed into my computer (Vista) when I installed teh Visual Studio. And now, I tried to install the Sql Server Mangement Studio from SQL SErver 2005 Developer edition into my Vista machine, the system doesnt allow me to do it. So, do i have to uninstall the express edition in my local computer (vista) and then install the SSMS from the SQL Server 2005 Developer edition disc? Or, there's somoe other work around that it will allow me to install the SSMS from SQL Server 2005 Developer edition and the same time, keep the 2005 Express edition running in my local computer system. My reason is, the SSMS is just a management tools, it shouldnt depends on what version of DB engine installed into my local computer. Anyone please help

|||

I am one of the people who got the SQL Server developer edition price down from $450 to $50 list so I don't think such strange uses is valid. However you can uninstall the standard Express and use the Advanced which is also free and comes with most features of the full product including Management Studio. But you still have to do what I have explained in my first post because Express and the Developer edition comes with most services disabled.

|||

ic.. so uninstall the pre-installed sql server express from my computer (which has the visual studio 2005 prof edition installed) wont affect my visual studio 2005, right? Just want to make sure before i uninstall anything Smile sorry about the noob question..

|||

Actually Microsoft now let you download the Management Studio for standard Express so download it below and install it. This link also gives you features compare of the Advanced and the Standard Express. But remember you have to go back and use my remote connection instruction. Hope this helps.

http://msdn2.microsoft.com/en-us/express/bb410792.aspx

How can I install SQL Server 2005 Developer Edition''s Management Studio on a desktop machine?

I have installed Visual Studio 2005 Prof Edition on a Vista machine and SQL Server 2005 Developer Edition on a Windows 2000 server. They will be used as a development environment for us. As we need to management the SQL Server 2005, we would like to install the 2005 Developer SSMS on the Vista machine such that we can manage the SQL Server 2005 developer instance installed on that Win2k machine. However, the system does not allow us to do it. We have the express edition autoamtically installed while we installed the Vistual Studio. Is there any workaround that i can still install the 2005 developer SSMS without uninstall the sql server 2005 Xpress version? Or, I have to uninstall the Xpress version before i can install the 2005 developer's SSMS? Please help!

All VS2005 pro comes with free SQL Server 2005 developer edition so you can install one in each Vista and do the needed configuration of enabling browser service, and enabling both TCP/IP and Named Pipes in configuration Manager and use the Surface Area Configuration tool to allow both local and remote and allow TCP/IP and Named Pipes. While you are at it also configure mixed Authentication so all developer can register each other SQL Server and access all in one place.

Another option is to uninstall Express and use Express Advanced that comes with Management Studio.


http://www.microsoft.com/downloads/details.aspx?familyid=5B5528B9-13E1-4DB9-A3FC-82116D598C3D&displaylang=en


|||

Thanks for the reply. My question probably not clear for what we're trying to do. Actually, we are trying to install an instance of SQL Server 2005 Developer Edition (whcih come with Visual Studio Developer Edition into a machine running Windows 2000 SP4). And then I installed the Visual Studio 2005 professional edition into my company which is running on a Vista version Ultimate. Both installation success without any big problem. However, I would like to be able to manage that SQL Server 2005 Developer edition which installed in that Windows 2000 server through my local computer (Windows Vista with Visual Studio 2005 Prof installed). The problem is, there is a SQL Server 2005 Express edition installed into my computer (Vista) when I installed teh Visual Studio. And now, I tried to install the Sql Server Mangement Studio from SQL SErver 2005 Developer edition into my Vista machine, the system doesnt allow me to do it. So, do i have to uninstall the express edition in my local computer (vista) and then install the SSMS from the SQL Server 2005 Developer edition disc? Or, there's somoe other work around that it will allow me to install the SSMS from SQL Server 2005 Developer edition and the same time, keep the 2005 Express edition running in my local computer system. My reason is, the SSMS is just a management tools, it shouldnt depends on what version of DB engine installed into my local computer. Anyone please help

|||

I am one of the people who got the SQL Server developer edition price down from $450 to $50 list so I don't think such strange uses is valid. However you can uninstall the standard Express and use the Advanced which is also free and comes with most features of the full product including Management Studio. But you still have to do what I have explained in my first post because Express and the Developer edition comes with most services disabled.

|||

ic.. so uninstall the pre-installed sql server express from my computer (which has the visual studio 2005 prof edition installed) wont affect my visual studio 2005, right? Just want to make sure before i uninstall anything Smile sorry about the noob question..

|||

Actually Microsoft now let you download the Management Studio for standard Express so download it below and install it. This link also gives you features compare of the Advanced and the Standard Express. But remember you have to go back and use my remote connection instruction. Hope this helps.

http://msdn2.microsoft.com/en-us/express/bb410792.aspx

How can I install SQL Server 2005 Developer Edition''s Management Studio on a desktop machine?

I have installed Visual Studio 2005 Prof Edition on a Vista machine and SQL Server 2005 Developer Edition on a Windows 2000 server. They will be used as a development environment for us. As we need to management the SQL Server 2005, we would like to install the 2005 Developer SSMS on the Vista machine such that we can manage the SQL Server 2005 developer instance installed on that Win2k machine. However, the system does not allow us to do it. We have the express edition autoamtically installed while we installed the Vistual Studio. Is there any workaround that i can still install the 2005 developer SSMS without uninstall the sql server 2005 Xpress version? Or, I have to uninstall the Xpress version before i can install the 2005 developer's SSMS? Please help!

All VS2005 pro comes with free SQL Server 2005 developer edition so you can install one in each Vista and do the needed configuration of enabling browser service, and enabling both TCP/IP and Named Pipes in configuration Manager and use the Surface Area Configuration tool to allow both local and remote and allow TCP/IP and Named Pipes. While you are at it also configure mixed Authentication so all developer can register each other SQL Server and access all in one place.

Another option is to uninstall Express and use Express Advanced that comes with Management Studio.


http://www.microsoft.com/downloads/details.aspx?familyid=5B5528B9-13E1-4DB9-A3FC-82116D598C3D&displaylang=en


|||

Thanks for the reply. My question probably not clear for what we're trying to do. Actually, we are trying to install an instance of SQL Server 2005 Developer Edition (whcih come with Visual Studio Developer Edition into a machine running Windows 2000 SP4). And then I installed the Visual Studio 2005 professional edition into my company which is running on a Vista version Ultimate. Both installation success without any big problem. However, I would like to be able to manage that SQL Server 2005 Developer edition which installed in that Windows 2000 server through my local computer (Windows Vista with Visual Studio 2005 Prof installed). The problem is, there is a SQL Server 2005 Express edition installed into my computer (Vista) when I installed teh Visual Studio. And now, I tried to install the Sql Server Mangement Studio from SQL SErver 2005 Developer edition into my Vista machine, the system doesnt allow me to do it. So, do i have to uninstall the express edition in my local computer (vista) and then install the SSMS from the SQL Server 2005 Developer edition disc? Or, there's somoe other work around that it will allow me to install the SSMS from SQL Server 2005 Developer edition and the same time, keep the 2005 Express edition running in my local computer system. My reason is, the SSMS is just a management tools, it shouldnt depends on what version of DB engine installed into my local computer. Anyone please help

|||

I am one of the people who got the SQL Server developer edition price down from $450 to $50 list so I don't think such strange uses is valid. However you can uninstall the standard Express and use the Advanced which is also free and comes with most features of the full product including Management Studio. But you still have to do what I have explained in my first post because Express and the Developer edition comes with most services disabled.

|||

ic.. so uninstall the pre-installed sql server express from my computer (which has the visual studio 2005 prof edition installed) wont affect my visual studio 2005, right? Just want to make sure before i uninstall anything Smile sorry about the noob question..

|||

Actually Microsoft now let you download the Management Studio for standard Express so download it below and install it. This link also gives you features compare of the Advanced and the Standard Express. But remember you have to go back and use my remote connection instruction. Hope this helps.

http://msdn2.microsoft.com/en-us/express/bb410792.aspx

how can i install reporting services 2005

Hi,
I installed sql server 2005 enterprise edition and visual studion 2005
professional.
but i am unable to create any projects. how can i create a report project '
(i cant find a business intelligence project anyw here
thanks in advanceYou need to install the BI client tools from the SQL Server CD/DVD.
Note that you did not need VS 2005 unless you are writing custom assemblies
or using VS specific tools (like the new controls found in VS 2005).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"RP" <RP@.discussions.microsoft.com> wrote in message
news:D06128B6-9838-47EE-A853-3BAD7187B66F@.microsoft.com...
> Hi,
> I installed sql server 2005 enterprise edition and visual studion 2005
> professional.
> but i am unable to create any projects. how can i create a report project
> '
> (i cant find a business intelligence project anyw here
> thanks in advance|||Bruce,
Can you tell me what options i have to select when installing sql server to
select BIclient tools ?
Thanks
"Bruce L-C [MVP]" wrote:
> You need to install the BI client tools from the SQL Server CD/DVD.
> Note that you did not need VS 2005 unless you are writing custom assemblies
> or using VS specific tools (like the new controls found in VS 2005).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:D06128B6-9838-47EE-A853-3BAD7187B66F@.microsoft.com...
> > Hi,
> > I installed sql server 2005 enterprise edition and visual studion 2005
> > professional.
> > but i am unable to create any projects. how can i create a report project
> > '
> > (i cant find a business intelligence project anyw here
> > thanks in advance
>
>|||I haven't installed it for awhile but it was obvious at the time.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"RP" <RP@.discussions.microsoft.com> wrote in message
news:410BFD9A-F285-434A-985B-D18837488701@.microsoft.com...
> Bruce,
> Can you tell me what options i have to select when installing sql server
> to
> select BIclient tools ?
> Thanks
> "Bruce L-C [MVP]" wrote:
>> You need to install the BI client tools from the SQL Server CD/DVD.
>> Note that you did not need VS 2005 unless you are writing custom
>> assemblies
>> or using VS specific tools (like the new controls found in VS 2005).
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "RP" <RP@.discussions.microsoft.com> wrote in message
>> news:D06128B6-9838-47EE-A853-3BAD7187B66F@.microsoft.com...
>> > Hi,
>> > I installed sql server 2005 enterprise edition and visual studion 2005
>> > professional.
>> > but i am unable to create any projects. how can i create a report
>> > project
>> > '
>> > (i cant find a business intelligence project anyw here
>> > thanks in advance
>>

Sunday, February 19, 2012

How can I generate xsd files from existing tables?

I would like to generate xml schema files for my data model for later use with testing tools such as ndbunit. I realize that Visual Studio datasets can be used to do this, however, Visual Studio does not automatically determine table realtionships. I do not want to manually specify these relationships. I also do not have the luxury of using TeamServer for DB professionals. The Database Diagrams feature of SQL Server Management Studio seems capable of determining the table relationships on its own. However, I don't see any way to simply export a databse diagram to an xml schema definition. I realize I could write code to do this myself using the nice APIs under the Microsoft.Sqlserver.management and System.xml namespace, but I'm trying to avoid doing this. Is there a way to do this with SQL Server Management Studio?

Would something like this work for you? It's not technically a "right-click" operation, but it does generate the schema:

SELECT *
FROM Customers
FOR XML RAW('Customer'), XMLSCHEMA('urn:example.com')
-

<xsd:schema targetNamespace="urn:example.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sqltypes=
"http://schemas.microsoft.com/sqlserver/2004/sqltypes"
elementFormDefault="qualified">
<xsd:import namespace=
"http://schemas.microsoft.com/sqlserver/2004/sqltypes" />
<xsd:element name="Customer">
...
</xsd:element>
</xsd:schema>
<Customer xmlns="urn:example.com" CustomerID="ALFKI" CompanyName="Alfreds Futterkiste" ContactName="Maria Anders" ContactTitle="Sales Representative" Address="Obere Str. 57" City="Berlin" PostalCode="12209" Country="Germany" Phone="030-0074321" Fax="030-0076545" />
...

|||Thanks for the suggestion. This will work fine for my needs!|||

I should be a little clearer. If you want just the schema for the table, select something that returns all nulls or an empty set, but make sure you use the XMLSCHEMA option. You can find more about that in Books Online - past this in the "URL" bar of BOL:

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/04b35145-1cca-45f4-9eb7-990abf2e647d.htm

Buck

|||When using the XMLSCHEMA option, I cannot seem to get the generated schema to contain foreign key constraints. I looked over the MSDN documentation, but I have not found any specific options related to this. Is this a limitation or am I simply missing some parameters that will cause the contraints to be included?|||You're not missing anything - it definitely won't do that. I would suggest you live.com search for a "database documenter" script (there are tons out there) and add the XMLSCHEMA to the end of one of those. That should give you a database design in an XML document.