Showing posts with label loaded. Show all posts
Showing posts with label loaded. Show all posts

Tuesday, March 20, 2012

Can't access an instance installed on same server

About 2 months ago I loaded a new instance on my SQL Server 200 box. I have
been working with the database in that instance. However, now I try to
access the other instance on the server and I get connection failed check
server registration properties. When I check them I get "login failed." I
switch the registration back to SQL and windows - same issue. All services
are running on server and users are able to get to database.
I checked whitepapers and KB but can't find what to do. Any assistance is
greatly appreciated.
Hi
If you login is failing how can your "users are able to get to database"?
If you can access the server using the given login though query analyser
(from the failing client), then check the connection string and check the
network libraries/protocols.
John
"Multitasker" wrote:

> About 2 months ago I loaded a new instance on my SQL Server 200 box. I have
> been working with the database in that instance. However, now I try to
> access the other instance on the server and I get connection failed check
> server registration properties. When I check them I get "login failed." I
> switch the registration back to SQL and windows - same issue. All services
> are running on server and users are able to get to database.
> I checked whitepapers and KB but can't find what to do. Any assistance is
> greatly appreciated.
sql

Can't access an instance installed on same server

About 2 months ago I loaded a new instance on my SQL Server 200 box. I have
been working with the database in that instance. However, now I try to
access the other instance on the server and I get connection failed check
server registration properties. When I check them I get "login failed." I
switch the registration back to SQL and windows - same issue. All services
are running on server and users are able to get to database.
I checked whitepapers and KB but can't find what to do. Any assistance is
greatly appreciated.Hi
If you login is failing how can your "users are able to get to database"?
If you can access the server using the given login though query analyser
(from the failing client), then check the connection string and check the
network libraries/protocols.
John
"Multitasker" wrote:

> About 2 months ago I loaded a new instance on my SQL Server 200 box. I hav
e
> been working with the database in that instance. However, now I try to
> access the other instance on the server and I get connection failed check
> server registration properties. When I check them I get "login failed." I
> switch the registration back to SQL and windows - same issue. All services
> are running on server and users are able to get to database.
> I checked whitepapers and KB but can't find what to do. Any assistance is
> greatly appreciated.

Can't access an instance installed on same server

About 2 months ago I loaded a new instance on my SQL Server 200 box. I have
been working with the database in that instance. However, now I try to
access the other instance on the server and I get connection failed check
server registration properties. When I check them I get "login failed." I
switch the registration back to SQL and windows - same issue. All services
are running on server and users are able to get to database.
I checked whitepapers and KB but can't find what to do. Any assistance is
greatly appreciated.Hi
If you login is failing how can your "users are able to get to database"?
If you can access the server using the given login though query analyser
(from the failing client), then check the connection string and check the
network libraries/protocols.
John
"Multitasker" wrote:
> About 2 months ago I loaded a new instance on my SQL Server 200 box. I have
> been working with the database in that instance. However, now I try to
> access the other instance on the server and I get connection failed check
> server registration properties. When I check them I get "login failed." I
> switch the registration back to SQL and windows - same issue. All services
> are running on server and users are able to get to database.
> I checked whitepapers and KB but can't find what to do. Any assistance is
> greatly appreciated.

Thursday, March 8, 2012

Cannot update record in database.

Hello,

I was stuck when update database using SqlDataAdapter. I have several textboxes in my webform1. When wepform1 is loaded, they will display user's information. The user can only input content in two textboxes. When user clicks the update button, I hope to update this record in SQL Server 2000 database. However, the program didn't work. There was no error message reported but when I stepped into the code, I found out that dataadapter's update method didn't succeed. I got 0 rows affected. Can I get some advice from someone ?

Here is the code:

string StrUpdateCmd = "Update Table1 Set Hphone = @.Hphone, Cphone = @.Cphone, Team = @.Team Where emailname =@.emailname ";

SqlDataAdapter UpdateDa = new SqlDataAdapter("Select * from Table1",SqlConnection1);
UpdateDa.UpdateCommand = new SqlCommand(StrUpdateCmd, SqlConnection1);

//Add parameters of update command.
SqlParameter prm1 = UpdateDa.UpdateCommand.Parameters.Add("@.Hphone",SqlDbType.NVarChar, 16);
prm1.Value = txtHphone.Text ;

SqlParameter prm2 = UpdateDa.UpdateCommand.Parameters.Add("@.Cphone",SqlDbType.NVarChar, 16);
prm2.Value = txtCphone.Text ;

SqlParameter prm3 = UpdateDa.UpdateCommand.Parameters.Add("@.Team",SqlDbType.NVarChar, 16);
prm3.Value = this.DropDownList1.SelectedItem.Value ;

SqlParameter prm4 = UpdateDa.UpdateCommand.Parameters.Add("@.emailname",SqlDbType.NVarChar, 50);
prm4.Value = txtEmail.Text;

try
{
DataSet dataset2 = new DataSet();

//Open database connection.
SqlConnection1.Open();
dataset2.Clear();
UpdateDa.Fill(dataset2, "Table1");

this.DataGrid1.DataSource = dataset2.Tables[0] ;
DataGrid1.DataBind ();

//Update database
int ret =UpdateDa.Update(dataset2,"Table1");
if( ret == 1 )
{
ShowMessage("Update succeed!");
}
else
{
ShowMessage("There is an error in updating ");
}

UpdateDa.Fill(dataset2);

//Show data after update.
this.DataGrid1.DataSource = dataset2;
DataGrid1.DataBind ();
}
catch (Exception ex)
{
throw ex;
}
finally
{
sqlConnection1.Close();
}In your Page_Load event handler, do you only bind from the database when IsPostback==false?

Friday, February 10, 2012

Cannot resolve collation conflict for equal to operation

We have loaded a db from a different SQL Server, and now we are trying to recreate some stored procedures. Some procs experience the error "Cannot resolve collation conflict for equal to operation ".

Can we simply create a new db on our target Sql Server, create the tables w/ the default collation sequence, and then use DTS to pull the data and populate the new db? Will this pull the data and store it in the desired collation? Seems like it should - let me know if it will/will not work, or if there's an easier way. Thanks!apparently the default collation of your sql server is not the same as the one from which you loaded the data. you can create a new database with the collation being the same as the one that of the server from which you are getting your data. and your new database will work without you changing anything!!!