|
Hello
I have a computer with sql server 2000 and sql server 2005.
for some reason the instance of sql server 2005 is not published in the network appropriately.
When I try to connect to the database engine I am going to the server name and I browse.
I go to network servers and I can find the instance of SQL Server 2000 but I cant find the instance of sql server 2005.
Does any one know what are all the options for registering the sqlserver instance ?
Clint
|
|
|
|
|
Can't you connect to it? Or you just can't find it in the list of servers in connection dialogs?
for MS SQL Server 2005 to be browsable, you must run the SQL Server browser service.
Start->SQL Server Configuration Tools->SQL Server Configuration manager
make sure that the SQL Server browser service is running.
I Hope this helps.
|
|
|
|
|
|
Need a little more info here.
What is your database?
If it is Sql server then:
First you will need a SqlConnection object:
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx[^]
Then you will need a Sqlcommand object:
http://msdn2.microsoft.com/en-us/library/system.data.dataset.aspx[^]
In your Sqlcommand object you set the stored procedure name, add the parameters and set them.
Next the question is: Does this stored procedure return data or insert records or what?
Based on that answer you will do a ExecuteReader or ExecuteNonQuery.
Hope that helps.
Ben
|
|
|
|
|
Googled it[^]
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
jayvaishnav82 wrote: how we can use stored proceder with asp.net
You don't. ASP.NET is a framework for building web applications.
ADO.NET is the component of the .NET Framework that deals with databases.
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "StoredProcedureName";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = myConnection;
cmd.ExecuteNonQuery();
SqlDataReader reader = cmd.ExecuteReader();
|
|
|
|
|
Good one Collin. Now if only we had a bitch-slap smiley down below.
|
|
|
|
|
Dear sir
thanx for responding pls send me full method for storedproceder with parameters i m beginer in asp.net(c#).
jayant vaishnav
jayant.vaishnav@rediffmail.com
thanx
|
|
|
|
|
jayvaishnav82 wrote: method for storedproceder with parameters
My previous post gave away enough information for you to have been able to look up the answer on MSDN.
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "StoredProcedureName";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = myConnection;
cmd.Parameters.Add("@parameterName", parameterValue);
cmd.ExecuteNonQuery();
SqlDataReader reader = cmd.ExecuteReader();
|
|
|
|
|
select * INTO [Instance1].targetDB.dbo.TargetTable from [Instance2].SourceDB.dbo.SourceTable
What I would like to do is copy the table from one instance to another.
How do I specify copying from one instance to another. I have already created the database.
The target is Sql 2000 and I have full control.
The source is Sql 2005 and I have only select permissions.
How would I forulate a correct select into statement?
Thanks,
Nick
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
It should be an insert statement
Insert into [Instance1].targetDB.dbo.TargetTable
select * from [Instance2].SourceDB.dbo.SourceTable
Hope that helps.
Ben
|
|
|
|
|
the problem is, how do I specify the Instances because "[Instance2].SourceDB.dbo.SourceTable" doesn't work. It has too many qualifiers.
I think I add a linked server on my side. But how do I specify in one line which instance to use?
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Your [Instance2] includes the sqlserver name right?
You know it might just be easier to DTS the table that is the way I do most of my table moving. Then you don't need to worry about link servers or any of that.
It is the Import export Data. If you have access to sql server 2005 management studio, you go to the database you want to export a table from right click -> tasks -> export data.
Then you just need to enter your destination sql server and database. Then select the table you want to copy.
Hope that helps.
Ben
|
|
|
|
|
You need to link the two instances together before you can do that. See: sp_addlinkedserver in the books online.
|
|
|
|
|
Hi
What is the best way to manage the user logins in the database for a school information system where there are students, teachers, system administrators, etc. Would you have separate tables for students, teachers and administrators, each with columns for username and password or one Users table with all the info including usernames and passwords? The problem is then that teachers and students may have different information that is captured for the database.
Kobus
|
|
|
|
|
kbalias wrote: Would you have separate tables for students, teachers and administrators, each with columns for username and password or one Users table with all the info including usernames and passwords?
I prefer to use single table with all info
kbalias wrote: The problem is then that teachers and students may have different information that is captured for the database.
Add one column in the user table for identifying the user type. It can be something like user_type and store the user type in that colunmn
|
|
|
|
|
I would normalise that out a bit more, and have a role table with the user table having a foreign key to the role table. By doing this, you can associate permissions to roles so you could have a student being able to view an item, and a teacher being able to view or edit it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
First at the DB security level you create roles of student, teacher, sysAdmin
Next you create only one user table and define your users.
Finally you bind each user to a specific role and use permissions to define the CRUD for each role.
|
|
|
|
|
hi,
anyone any idea if there is some SQL syntax for converting an integer to hexadecimal ?
Thx
Kurt
|
|
|
|
|
i've found HEX in the books online but seems that it isn't available in SQL2005...
but i've found this (ofcourse microsoft undocumented) one :
DECLARE @x BINARY(16) ( or int if you please)
SET @x = 255
SELECT master.dbo.fn_varbintohexstr(@x)
greetz...
|
|
|
|
|
SQL Server is not designed to present data. It is designed to store and retrieve data efficiently.
If you need to show integers in hexadecimal in your application, make the client-side application do it. The same goes for things like string concatenation.
|
|
|
|
|
That's true,
but the (my concept) SQl server needs to prepare some things so the (dum and transparant) applications just need to pickup data end send it to hardware...
if the hardware gets a firmware update we don't need to replace all the applications, we only need to modify one stored proc.. so easy to maintain..
the apps are installed on embeddeds also so we don't want them to do a lot of time absorbing work.
ofcours we can also use services on the server who can do the work but that takes a lot of extra work and my experience is that MSSQL is very powerfull en can handle those things without any problems..
but i guess this is my opinion..ofcourse any suggestions or better concepts to do this are very welcome..
Thx..
Kurt
|
|
|
|
|
So why are stored procedures, views and functions implemented in MSSQL then ?
i solve things this way :
insert into A
select fielda, fieldb, LEFT(fieldc, 50) from B Where fieldd = 1
i suppose retrieve all the 50.000 records to a service truncate the string in the client app and sending 50.000 update records from a client app to your MSSQL server is taking more time then this query...
greetz..
tell me if i'm wrong.
|
|
|
|
|
I am new to reports so might this question seamed stupid ... I am using Report Application Sever .I create a table and populate all the data required.Now I want to create a cross-tab (pivot table) instead and embed a report within the cell of cross-tab ... is it possible ?
Best Regards,
Madni
|
|
|
|
|
hi ,
i have created views in database Test, in sqlServer.when i had to import Test to another database Test1, the views become hiddden.
i can't see the views and when i try to create them again, i get this msg:
There is already an object named 'view1' in the database.
so how can i resolve this problem?
thanks,
|
|
|
|