Showing posts with label reference. Show all posts
Showing posts with label reference. Show all posts

Sunday, March 25, 2012

(local) vs. the actual name of SQL Server when using a named instance

Hello,
My question is this: in a named instance installation of a SQL Server, when
you reference the server as (local) from a Stored Procedure that accesses a
table for example, will that point to the Named Instance or will it access
the table on the actual database on the main installation?
Thank you
leo
WHere yo you name the server as (local) in a stored procedure ? You
don=B4t have to. Just use the three or two part name that should be
enough for you.
HTH, Jens Suessmeyer,
sql

(local) vs. the actual name of SQL Server when using a named instance

Hello,
My question is this: in a named instance installation of a SQL Server, when
you reference the server as (local) from a Stored Procedure that accesses a
table for example, will that point to the Named Instance or will it access
the table on the actual database on the main installation?
Thank you
leoWHere yo you name the server as (local) in a stored procedure ? You
don=B4t have to. Just use the three or two part name that should be
enough for you.
HTH, Jens Suessmeyer,|||Referencing (local) implies that you are creating a new connection. This
connection won't know which instance the command comes from so will connect
to the default instance.
Is this bcp or osql? Can't think of another reason for it.
If you want to connect to the same instance from an sp then use @.@.servername
and put it in [].
"Leo" wrote:
> Hello,
> My question is this: in a named instance installation of a SQL Server, when
> you reference the server as (local) from a Stored Procedure that accesses a
> table for example, will that point to the Named Instance or will it access
> the table on the actual database on the main installation?
>
> Thank you
> leo
>
>|||I am actually running an Instance of SQL server on the same machine as an
installation of SQL server. The reason for that is QA testing. When I make a
change to the database I copy it to the instance os SQL on the same machine.
I am using store procedures to run DTS packages. So I am doing a DTSRUN
command on the package. On my SQL server I was using (local) as my server.
The reason I asked was that I didn't want to go into the Instance of the SQL
and change the name of the server on the stored procedures manually. I
wanted the stored proc to pick up the name of the server it;s running on
without manual changes to the code. I was affraid that if I leave that code
unchanged as (local) that the stored proc will look for the wrong DTS
package, meaning the one on the SQL server, not the one in the instance of
SQL. I am not sure if I made this more confusing or more explained.
in short I am trying to provide the samew functionality within one physical
sever using an installation of a SQL instance, as if it was two separate
physical servers, where you can reference (local) and whenever you more a
stored proc from one server to the other you do not need to change that code
to point to the right SQL server
Thanks
Leo
"Nigel Rivett" <NigelRivett@.discussions.microsoft.com> wrote in message
news:15408704-EE37-4A96-97D2-1BF39A6CE5AE@.microsoft.com...
> Referencing (local) implies that you are creating a new connection. This
> connection won't know which instance the command comes from so will
connect
> to the default instance.
> Is this bcp or osql? Can't think of another reason for it.
> If you want to connect to the same instance from an sp then use
@.@.servername
> and put it in [].
> "Leo" wrote:
> > Hello,
> >
> > My question is this: in a named instance installation of a SQL Server,
when
> > you reference the server as (local) from a Stored Procedure that
accesses a
> > table for example, will that point to the Named Instance or will it
access
> > the table on the actual database on the main installation?
> >
> >
> >
> > Thank you
> >
> > leo
> >
> >
> >

(local) vs. the actual name of SQL Server when using a named instance

Hello,
My question is this: in a named instance installation of a SQL Server, when
you reference the server as (local) from a Stored Procedure that accesses a
table for example, will that point to the Named Instance or will it access
the table on the actual database on the main installation?
Thank you
leoWHere yo you name the server as (local) in a stored procedure ? You
don=B4t have to. Just use the three or two part name that should be
enough for you.
HTH, Jens Suessmeyer,

Sunday, March 11, 2012

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

This forum is for Analysis Services -related questions. Try posting on "SQL Server Tools General" forum.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

This forum is for Analysis Services -related questions. Try posting on "SQL Server Tools General" forum.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

David,

I will do some research on "Object reference not set to" error. You can edit data directly from the results pane.

Thanks!

|||

David,

We need more information about this error. Are you still able to reproduce this error?

Thanks!

|||

I have never been able to explain why it happened. When I would try to do "open table" I would always get the "object ref not set" error. I did uninstall and when I re-installed the install locked up on "Setting File Security". I had seen that error before and knew to unplug the network connection. After I reinstalled the error went away.

I wanted to know if we can get behahivior similiar to 2000 where a user could enter a sql select and then edit the results in results pane. The open table helps but when you want to quickly change a value the edit of a few rows is easier than finding a row in a large result set. Also I noticed when I unistalled I had to uninstall each component separately. Can the uninstall of sql server 2005 uninstall all components.

thanks

|||

Sounds like "object ref not set" error might have been due to corrupted installation. Please let us know if you encounter that error again.

Current SQL Editor does not allow you to edit directly from the results grid as you've noticed. You can choose Open Table and bring up SQL Pane from the Query Designer by either clicking on a toolbar icon (a whitebox with SQL text in it) or hitting CTRL+3. Then edit the SQL syntax to bring up a sub-set of records for editing.

For uninstallation issue, please provide your feedback through http://lab.msdn.microsoft.com/productfeedback/Default.aspx. All feedbacks received via our Product Feedback center are reviewed by the team and we treat them seriously.

Hope this helps.

Thanks!

|||

Can you give us the logic behind why you can't edit the result set of a query?!?!

I am, frankly, astonished that this feature was removed. It is truly one of the most useful features for a quick edit of data.

On that note, the workaround is that you "open the table"? Am I missing something that doing an "open table" produces all data in the table? So, we have to burden the machine with potentially thousands upon thousands of records just to edit a single field? Crazy!

Also, using a join query after "opening" the table results in read only!

The other way around is to find the right record ID, then write an update query?

Seriously, is there any explanation because it sounds completely ludicrous to me? What was the point of this?

/sorry to seem so annoyed, but so many people rely on this feature. I know I'm not the only one.

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

David,

I will do some research on "Object reference not set to" error. You can edit data directly from the results pane.

Thanks!

|||

David,

We need more information about this error. Are you still able to reproduce this error?

Thanks!

|||

I have never been able to explain why it happened. When I would try to do "open table" I would always get the "object ref not set" error. I did uninstall and when I re-installed the install locked up on "Setting File Security". I had seen that error before and knew to unplug the network connection. After I reinstalled the error went away.

I wanted to know if we can get behahivior similiar to 2000 where a user could enter a sql select and then edit the results in results pane. The open table helps but when you want to quickly change a value the edit of a few rows is easier than finding a row in a large result set. Also I noticed when I unistalled I had to uninstall each component separately. Can the uninstall of sql server 2005 uninstall all components.

thanks

|||

Sounds like "object ref not set" error might have been due to corrupted installation. Please let us know if you encounter that error again.

Current SQL Editor does not allow you to edit directly from the results grid as you've noticed. You can choose Open Table and bring up SQL Pane from the Query Designer by either clicking on a toolbar icon (a whitebox with SQL text in it) or hitting CTRL+3. Then edit the SQL syntax to bring up a sub-set of records for editing.

For uninstallation issue, please provide your feedback through http://lab.msdn.microsoft.com/productfeedback/Default.aspx. All feedbacks received via our Product Feedback center are reviewed by the team and we treat them seriously.

Hope this helps.

Thanks!

|||

Can you give us the logic behind why you can't edit the result set of a query?!?!

I am, frankly, astonished that this feature was removed. It is truly one of the most useful features for a quick edit of data.

On that note, the workaround is that you "open the table"? Am I missing something that doing an "open table" produces all data in the table? So, we have to burden the machine with potentially thousands upon thousands of records just to edit a single field? Crazy!

Also, using a join query after "opening" the table results in read only!

The other way around is to find the right record ID, then write an update query?

Seriously, is there any explanation because it sounds completely ludicrous to me? What was the point of this?

/sorry to seem so annoyed, but so many people rely on this feature. I know I'm not the only one.

"Open Table" NOT WORKING in Management Studio

When I open a database and right click and select "Open Table" I get the error message "Object reference not set to...". What could the issue be. I have loaded the adventure works db and tried it also and still get the same error. Could someone at MS please respond to this. Also when open table works can I directly edit values in the result pane like I did in Sql Server 2000?

David,

I will do some research on "Object reference not set to" error. You can edit data directly from the results pane.

Thanks!

|||

David,

We need more information about this error. Are you still able to reproduce this error?

Thanks!

|||

I have never been able to explain why it happened. When I would try to do "open table" I would always get the "object ref not set" error. I did uninstall and when I re-installed the install locked up on "Setting File Security". I had seen that error before and knew to unplug the network connection. After I reinstalled the error went away.

I wanted to know if we can get behahivior similiar to 2000 where a user could enter a sql select and then edit the results in results pane. The open table helps but when you want to quickly change a value the edit of a few rows is easier than finding a row in a large result set. Also I noticed when I unistalled I had to uninstall each component separately. Can the uninstall of sql server 2005 uninstall all components.

thanks

|||

Sounds like "object ref not set" error might have been due to corrupted installation. Please let us know if you encounter that error again.

Current SQL Editor does not allow you to edit directly from the results grid as you've noticed. You can choose Open Table and bring up SQL Pane from the Query Designer by either clicking on a toolbar icon (a whitebox with SQL text in it) or hitting CTRL+3. Then edit the SQL syntax to bring up a sub-set of records for editing.

For uninstallation issue, please provide your feedback through http://lab.msdn.microsoft.com/productfeedback/Default.aspx. All feedbacks received via our Product Feedback center are reviewed by the team and we treat them seriously.

Hope this helps.

Thanks!

|||

Can you give us the logic behind why you can't edit the result set of a query?!?!

I am, frankly, astonished that this feature was removed. It is truly one of the most useful features for a quick edit of data.

On that note, the workaround is that you "open the table"? Am I missing something that doing an "open table" produces all data in the table? So, we have to burden the machine with potentially thousands upon thousands of records just to edit a single field? Crazy!

Also, using a join query after "opening" the table results in read only!

The other way around is to find the right record ID, then write an update query?

Seriously, is there any explanation because it sounds completely ludicrous to me? What was the point of this?

/sorry to seem so annoyed, but so many people rely on this feature. I know I'm not the only one.

"Object reference not set to an instance of an object" error

Hi,guys
I met a problem, the error message is "Object reference not set to an instance of an object." ,which indicating the * row has this problem. I really don't understand, please help me!
Bellow is my code:
private void BindTypeData(){
string query = "select * from tblFacilityType";
sqlDataAdapter = new SqlDataAdapter(query,sqlConnection);
ds = new DataSet();
sqlDataAdapter.Fill(ds,"tblFacilityType");
* FacilityDataGrid.DataSource = ds.Tables["tblFacilityType"];
FacilityDataGrid.DataBind();
}
Thanks first!

feiMake sure that sqlConnection and FacilityDataGrid are instantiated somewhere else.|||hi,jason
I've checked, it is there. But i still have the same problem!

public class __FacilityType : System.Web.UI.UserControl
{
protected DataSet ds;
protected SqlConnection sqlConnection;
protected SqlDataAdapter sqlDataAdapter;
protected SqlCommand sqlSelectCommand;
protected SqlCommand sqlInsertCommand;
protected Panel FacilityTypePanel;
protected DataGrid FacilityTypeDataGrid;
protected SqlDataReader reader;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if(!Page.IsPostBack){
BindTypeData();
}
}
//Todo: bind data for the facility list datagrid
private void BindTypeData(){
string query = "select * from tblFacilityType";
sqlDataAdapter = new SqlDataAdapter(query,sqlConnection);
ds = new DataSet();
sqlDataAdapter.Fill(ds,"tblFacilityType");
FacilityTypeDataGrid.DataSource = ds.Tables["tblFacilityType"];
FacilityTypeDataGrid.DataBind();
}|||Where and how are u instantiating sqlConnection?