Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Thursday, March 29, 2012

error: Cursor not returned from query

I'm a really beginner about sql2000.
During my test I have created the following query. It's works ok until I
do't add the code included in section A, when I add it the i obtain the
error: Cursor not returned from query

Anyone can help me?

Thanks Carlo M.

set nocount on

IF OBJECT_ID('storico_big') IS NULL -- section A begin
create table storico_big( data datetime,
bcarrier varchar(20),
bda CHAR(30),
bzone char(50),
bdur int) ;
insert into storico_big -- section A
end

select top 10000
adetdate,bcarrier,bda,bzone,bdur
from pp_cdr (nolock)
where
adetdate < :data_fin and adetdate > :data_in order by adetdate
set nocount off

-- end of queryIW2FIV (carlo.merlini[NONROMPERE]@.libero.it) writes:
> I'm a really beginner about sql2000.
> During my test I have created the following query. It's works ok until I
> do't add the code included in section A, when I add it the i obtain the
> error: Cursor not returned from query

Apparently you are using some environment unknown to me. At least I
don't recognize the message.

> IF OBJECT_ID('storico_big') IS NULL -- section A begin
> create table storico_big( data datetime,
> bcarrier varchar(20),
> bda CHAR(30),
> bzone char(50),
> bdur int) ;
> insert into storico_big -- section A
> end

Since there are several apparent syntax errors here, it would have been nice
if you environment had returned the errors from SQL Server, rather than
bitching about the missing cursor.

It can be a good to run the query from Query Analyzer to get better
error diagnostics.

I don't really want to suggest a correction, because I can't understand
what you are trying to do. It appears that in the same batch that you first
want to create a table, insert into it, and then select data from another
table.

Possibly you want to insert the data from the SELECT statement into
storico_big, but in such case you should

1) get rid of that extraneous end
2) add an explicit column list to the INSERT statement.

However, I have a feeling that if you insert data into the table, the
client environment will still complain about a missing cursor...

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland Sommarskog wrote:
> IW2FIV (carlo.merlini[NONROMPERE]@.libero.it) writes:
> > I'm a really beginner about sql2000.
> > During my test I have created the following query. It's works ok until I
> > do't add the code included in section A, when I add it the i obtain the
> > error: Cursor not returned from query
> Apparently you are using some environment unknown to me. At least I
> don't recognize the message.
I would suspect that it's some data layer (such as ADO, ADO.NET, DAO,
etc), which has at least two different methods of performing work in
the database - one for performing data retrieval and another (possibly
on another object, if the layer is object oriented) which allows data
manipulation.

For instance, ADO.NET has ExecuteReader and ExecuteNonQuery methods on
it's command object.

Damien|||Damien (Damien_The_Unbeliever@.hotmail.com) writes:
> I would suspect that it's some data layer (such as ADO, ADO.NET, DAO,
> etc), which has at least two different methods of performing work in
> the database - one for performing data retrieval and another (possibly
> on another object, if the layer is object oriented) which allows data
> manipulation.
> For instance, ADO.NET has ExecuteReader and ExecuteNonQuery methods on
> it's command object.

Obviously IWZFIV is not using ADO .Net. ADO .Net does work with cursors
at all, as far as a I know. A more substantial clue is the condition:

adetdate < :data_fin and adetdate > :data_in order by adetdate

Apparently IWZFIV is using some form of embedded SQL.

Anyway, I would not really describe ADO .Net as providing different methods
for different purposes. If all you want is minimalism, you can do every-
thing with ExecuteReader. The other methods, ExecuteNonQuery, ExecuteScalar
and DataAdapter.Fill can be seen as convenience methods implemented on
top of ExecuteReader. (OK, this is not really true. There are some
fine differences when there are multiple error messages and result sets
interleaved.)
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Tuesday, March 27, 2012

Error: An error occurred due to no connection

This error is for Nov RTM running under "NETWORK SERVICE" account.

I created a data source "MyDataSource". It looks like:
<DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0" xsi:type="RelationalDataSource" dwd:design-time-name="2d2b4fc8-af5c-4314-9155-384afd11fb70" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ID>MyDataSource</ID>
<Name>MyDataSource</Name>
<CreatedTimestamp>0001-01-01T05:00:00Z</CreatedTimestamp>
<LastSchemaUpdate>0001-01-01T05:00:00Z</LastSchemaUpdate>
<ConnectionString>Provider=SQLOLEDB.1;Data Source=dbserver\my_instance;Integrated Security=SSPI;Initial Catalog=MyDataSource</ConnectionString>
<ConnectionStringSecurity>Unchanged</ConnectionStringSecurity>
<ImpersonationInfo>
<ImpersonationMode>ImpersonateServiceAccount</ImpersonationMode>
<ImpersonationInfoSecurity>Unchanged</ImpersonationInfoSecurity>
</ImpersonationInfo>
<Timeout>PT0S</Timeout>
</DataSource>

In my package, I obtain a new connection from the data source (test connection succeeds). I use a data flow task. Inside the data flow task I have a flat file source and an Ole Db Destination. For configuring OleDbDestination, I can see in the drop-down a list of tables in my database. When I select the desired table and click "preview", I get:
TITLE: Microsoft Visual Studio

Error at Data Flow Task - my task [OLE DB Destination [831]]: An error occurred due to no connection. A connection is required when requesting metadata.

--
ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0202022 (Microsoft.SqlServer.DTSPipelineWrap)


BUTTONS:

OK
TIA,
Nitesh

Can you please check that you are not working with "Work Offline" settings.

Thursday, March 22, 2012

error: 40 with sql server 2000

Hi

I am getting this really annoying error that I cant resolve.

I have created a website that accesses a SQL SERVER 2000 database and it works perfectly on my home machine. The error has occurred when I have transferred it to my hosts server.

This is the error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

This is my connection string:

<add key="ConnectionString" value="Provider=sqloledb;Data Source=hostsserver****,1433;Initial

Catalog=db******;User Id=dbo*******;Password=********; "/>

It says I am trying to connect to a SQL SERVER 2000 database as this is what I devloped the site on so I don not know why it thinks I am trying to connect to SQL SERVER 2005.

Can anyone help?

Moving to the Data Access forum.|||

Is this constant or intermittent error?

1) Make sure no typo on the data source (server name)
2) Hostsserver,1433, implys it will use TCP, so make sure TCP is enabled on the sql server. Keep in mind firewall can block the traffic, so put 1433 into exception.

Did you install SQL server 2005 and/or SNAC on your client machine? Client stack does not know whether the target sql server is 2000 or 2005. 2005 is always reported, You can ignore it.

Thanks.

|||

Hi
Thanks for replying.
I have double checked the datasource and that seems right.

How can I check if the host server is TCP enabled?

I have never installed/used 2005 so dont know why.

any help would be really appreciated.

|||On you server machine, Start->All Programs->Microsoft SQL Server -->SQL Server Server Utility. Add TCP to your enabled protocols and restart sql server.sql

error: 40 - Could not open a connection to SQL Server

I have created a new aspx site on 'server 1' which connects to an sql server 200 on 'server 2' 'Server 1' is a test server and all works fine. I then move the site onto 'server 3' and receive the error below.

This must be a problem with 'server 3'. I have installed .net version 2 on this server and there are currently no aspx sites running of this server. There must be smothering not configured right. There are other sites on the server that are talking to the SQL server.

Any help would be great.

Thanks

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 
[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735059
  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
  System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820
  System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
  System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
  System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
  System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
  System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
  System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
  System.Data.SqlClient.SqlConnection.Open() +111
  System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
  System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
  System.Web.UI.WebControls.Repeater.GetData() +50
  System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +232
  System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
  System.Web.UI.WebControls.Repeater.DataBind() +72
  System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
  System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +12
  System.Web.UI.Control.PreRenderRecursiveInternal() +77
  System.Web.UI.Control.PreRenderRecursiveInternal() +161
  System.Web.UI.Control.PreRenderRecursiveInternal() +161
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

Hi,

I also faced same problem. I was using following connection string.

<add name="ConnectionString" connectionString="data source=local;initial catalog=Rainbow;integrated security=True;User ID=;Password="/>

And modified to this.

<add name="ConnectionString" connectionString="data source=localhost;initial catalog=Rainbow;integrated security=True;User ID=;Password="/>

It started working in my case :)-

Regards,

Gaurav Goel

Wednesday, March 21, 2012

Error: 18456, Severity: 14, State: 12.

I am running SQL Server 2005 x64 SP2 and have problem connecting to database with the SQL logins I created. I test the database login using Microsoft ODBC Administrator to connect the the database locally, only 'sa' can login. All other sql logins I created fails and returns this message:


Microsoft SQL Server Login

Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'doteasylogin'.


OK

In the SQL Logs, it shows: Error: 18456, Severity: 14, State: 12.

The SQL Services is running as 'Local System'.

Can anyone help please?

Did you create the user at the server level and give him access to the server (and to the database) ? The state 12 indicates that there is an access problem which is normally dedicated to the fact that the user is either not allowed to login or does not have the appropiate permissions for the database.


Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I created the user 'testlogin' in SQL Server Login and grant the 'testlogin' user db_datareader & db_datawriter permission in Database Role Membership.

I'm using Windows Server 2003 x64 standard edition.

|||

Try executing the following two queries and check that each of them returns a row:

select name, principal_id from sys.server_principals where name = 'testlogin'

select permission_name, state_desc from sys.server_permissions where grantee_principal_id = suser_id('testlogin')

The first query should return the 'testlogin' login name and its associated id.

The second query should display a row with the CONNECT_SQL, GRANT value.

Thanks

Laurentiu

|||

Hello.

I have the same problem.

I am a beginner in SQL Server.I tried to install SQLServerExpress2005sp2

I've migrated a database from Access.

I tried to make a new user: for example 'testlogin' .

I've do all you sugest (server permissions, database permissions, ..)

I've run the queries from above and everything seems ok, but I cannot connect to database using the 'testlogin' account.

Error: 18456, Severity: 14, State: 12.

Login failed for user 'testlogin'. [CLIENT: xx.xx.xx.xxx]

IMPORTANT: if I grant sysadmin role to 'testlogin' I can connect.

thanks a lot in advance.

|||I started receiving this error after attempting to set up database mirroring. After running through the configuration including setting up endpoints (unsuccessfully) the mirror server has stopped accepting logins from SQL accounts (except SA). The principal server still accepts SQL logins without failure. I have stopped mirroring and deleted the database on both servers. Thank you for any help you can give. This was not an issue before I attempted database mirroring.

Okay after looking at it further it turned out that in my instance there was a new object for mirroring created. This object was accessible by going to the properties of the user account, choosing securables on the left side of the window. Then click on the add button and choose "all objects of the types" click OK; check Endpoints and click OK. In my case I saw the "Mirroring" option under Securables. That seems to be the culprit, after selecting Grant for the Connect permission I was able to connect fine. As a temporary solution I have chosen to follow the steps mentioned before using the "Public" server role, that way all accounts will have connect access. This is just temporary until I learn how to Drop the pesky Mirroring object from the server altogether.
|||

I am having the same issue, create a login using TSQL and granting access to a user database and it will not connect. I have tried the queries mentioned and from sys.server_permissions is saying CONNECT SQL with the GRANT option.

As soon as I added the user to the sysadmin server role, no problems connecting.

Thank you.

Error: 18456, Severity: 14, State: 12.

I am running SQL Server 2005 x64 SP2 and have problem connecting to database with the SQL logins I created. I test the database login using Microsoft ODBC Administrator to connect the the database locally, only 'sa' can login. All other sql logins I created fails and returns this message:


Microsoft SQL Server Login

Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'doteasylogin'.


OK

In the SQL Logs, it shows: Error: 18456, Severity: 14, State: 12.

The SQL Services is running as 'Local System'.

Can anyone help please?

Did you create the user at the server level and give him access to the server (and to the database) ? The state 12 indicates that there is an access problem which is normally dedicated to the fact that the user is either not allowed to login or does not have the appropiate permissions for the database.


Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I created the user 'testlogin' in SQL Server Login and grant the 'testlogin' user db_datareader & db_datawriter permission in Database Role Membership.

I'm using Windows Server 2003 x64 standard edition.

|||

Try executing the following two queries and check that each of them returns a row:

select name, principal_id from sys.server_principals where name = 'testlogin'

select permission_name, state_desc from sys.server_permissions where grantee_principal_id = suser_id('testlogin')

The first query should return the 'testlogin' login name and its associated id.

The second query should display a row with the CONNECT_SQL, GRANT value.

Thanks

Laurentiu

|||

Hello.

I have the same problem.

I am a beginner in SQL Server.I tried to install SQLServerExpress2005sp2

I've migrated a database from Access.

I tried to make a new user: for example 'testlogin' .

I've do all you sugest (server permissions, database permissions, ..)

I've run the queries from above and everything seems ok, but I cannot connect to database using the 'testlogin' account.

Error: 18456, Severity: 14, State: 12.

Login failed for user 'testlogin'. [CLIENT: xx.xx.xx.xxx]

IMPORTANT: if I grant sysadmin role to 'testlogin' I can connect.

thanks a lot in advance.

|||I started receiving this error after attempting to set up database mirroring. After running through the configuration including setting up endpoints (unsuccessfully) the mirror server has stopped accepting logins from SQL accounts (except SA). The principal server still accepts SQL logins without failure. I have stopped mirroring and deleted the database on both servers. Thank you for any help you can give. This was not an issue before I attempted database mirroring.

Okay after looking at it further it turned out that in my instance there was a new object for mirroring created. This object was accessible by going to the properties of the user account, choosing securables on the left side of the window. Then click on the add button and choose "all objects of the types" click OK; check Endpoints and click OK. In my case I saw the "Mirroring" option under Securables. That seems to be the culprit, after selecting Grant for the Connect permission I was able to connect fine. As a temporary solution I have chosen to follow the steps mentioned before using the "Public" server role, that way all accounts will have connect access. This is just temporary until I learn how to Drop the pesky Mirroring object from the server altogether.
|||

I am having the same issue, create a login using TSQL and granting access to a user database and it will not connect. I have tried the queries mentioned and from sys.server_permissions is saying CONNECT SQL with the GRANT option.

As soon as I added the user to the sysadmin server role, no problems connecting.

Thank you.

Friday, March 9, 2012

Error Working With DTS -- "Class Not Registered"

I have a DTS package (stored in a .dts file) that was created in SQL Server 2000 and I am trying to work with it in SQL 2005. When I try to import it into the Legacy > Data Transformation Services node in Management Studio, I get a window that reads "Class Not Registered (Microsoft Data Transformation Services (DTS) Package)". I get the same error if I try to just execute the package itself from a query window.

I have Legacy Support installed, and I also have Integration Services installed.

Any ideas? We have three installations of SQL 2005 and I am getting the same error on all of them.

Have you installed Microsoft SQL Server 2000 DTS Designer Components from here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&displaylang=en

The DTS designer does not get installed with SSIS.

Thanks.

Error with using nvarchar datatype

Hi, I have created a database using VWD to keep values of urls and have structured it as...

Prefix (http://, network name),address(www.name.com), andname (name of address), theaddress field has been defined as a nvarchar(MAX).

Most of the addresses updated into the address field work, except something like:www.java-scripts.net/javascripts/Image-Rollover-Script.phtml.

I get this error:

Cannot open user default database. Login failed.
Login failed for user 'NETWORKNAME\ASPNET'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.
Login failed for user 'NETWORKNAME\ASPNET'.

Source Error:

Line 1176: if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) Line 1177: != System.Data.ConnectionState.Open)) {Line 1178: this.Adapter.InsertCommand.Connection.Open();Line 1179: }Line 1180: try {

I can insert something likewww.google.com into theaddresses field without any errors. Any ideas why?
If it is a nvarchar type it should be able to except all sorts of characters??

The error itself has nothing to do with datatypes. It's a connection error which implies that you have invalid credentials in the connection string (it seems to run using integrated Windows authentication).

|||

Hello, I apologise, but i was checking something in the database when I was writing this post. After closing the connection and re-entering the field entry >www.java-scripts.net/javascripts/Image-Rollover-Script.phtml

Here is the error i have been getting:

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Source Error:

Line 1095: this.Adapter.SelectCommand = this.CommandCollection[0];Line 1096: TasksDataSet.intranet_addressesDataTable dataTable = new TasksDataSet.intranet_addressesDataTable();Line 1097: this.Adapter.Fill(dataTable);Line 1098: return dataTable;Line 1099: }

Hope this makes sense. If I delete the submitted value from the database and re-enter something likewww.google.com, it works fine.
So why would a URL likewww.java-scripts.net/javascripts/Image-Rollover-Script.phtml cause the above error?

|||

Ah, the dreaded ConstraintException.. The error is in the DataTable, not in the query execution. You can get a better error message by catching the exception and sending it to this method:

public static string ConstraintExceptionToString(ConstraintException ce, DataTable dt) {return"Constraint Exception [" + ce.Message +"] in " + dt.TableName +" (" + dt.Rows.Count +" rows)\n" + DataTableErrorsToString(dt);}public static string DataTableErrorsToString(DataTable dt) {StringBuilder sb =new StringBuilder();for (int x=0; xif (dr.HasErrors) {sb.Append("\tError in row " + x +": " + dr.RowError +"\n");}}return sb.ToString();}
|||

Very interesting, where abouts would I place the above script?

|||

Oohh...don't say "script"... .NET developers will look strangely upon you...Smile

The methods are just helper methods that will retrieve the actual constraint error. For simplicity's sake we can add them to the same class as your data filling method.

this.Adapter.SelectCommand =this.CommandCollection[0];
TasksDataSet.intranet_addressesDataTable dataTable =new TasksDataSet.intranet_addressesDataTable();
try{this.Adapter.Fill(dataTable);
}
catch(ConstraintException ce)
{
throw new ConstraintException(ConstraintExceptionToString(ce,dataTable),ce);
}
return dataTable;
}

public static string ConstraintExceptionToString(ConstraintException ce, DataTable dt)
{
return"Constraint Exception [" + ce.Message +"] in " + dt.TableName +" (" + dt.Rows.Count +" rows)\n" +
DataTableErrorsToString(dt);
}

public static string DataTableErrorsToString(DataTable dt)
{
StringBuilder sb =new StringBuilder();
for (int x=0; x < dt.Rows.Count; x++)
{
DataRow dr = dt.Rows[x];
if (dr.HasErrors)
{
sb.Append("\tError in row " + x +": " + dr.RowError +"\n");
}
}
return sb.ToString();
}


|||

Cheers Gunteman, I'll have to remember that for my future post! Ahem, one more question.

I am working with Visual Web Developer, and the files I am working with are...

index.aspx (holds the gridview and dataset information), The TaskDataSet.xsd and the database itself.
In which of the files in my Visual Web Developer do I place the above method, or do I open a class in VWD to place it into?

I did have a try implementing the above before posting, but still not sure where it goes...

I appreciate any more help you can pass my way :-)

|||

You would probably be better off using nvarchar(2048) than nvarchar(max). As far as I am aware, there isn't a defined limit, but most browsers (IE, etc.) won't handle more than that, and some proxies/security scanners won't allow more than 1024.

|||

Hi, thanks for the reply. I have updated it from MAX to 2048, so thats very cool to know.

But it hasnt fixed my problem with inserting the following address into my database:www.java-scripts.net/javascripts/Image-Rollover-Script.phtml

|||

jamesstar:

I did have a try implementing the above before posting, but still not sure where it goes...

I appreciate any more help you can pass my way :-)

If you look closely you''ll see that I've just continued from the portion of your code that was visible in the error message.

|||

Ah yes, I see now... :-D

Hmm, that code comes from a temporary App_Code (something).cs file within the framework.
So I gather even if I changed that one file, it wouldnt be permanent, I will do some further research and see if I can locate the hard copy of that file.

I thought you might be able to create a CS file inside the App_Code folder that could be shared across all files.

Okay, chat soon.

|||

Okay, after visiting a few more forums and hands in head. I started reading through each line in the error code and noticed the dataset code had not updated itself.

It was still referencing each column in the table with nvarchar(MAX), even though I had updated the database.

So I deleted my current dataset file and re-inserted it back in... and now, wonderfully enough... my aspx page works!

Yahhh ~ Thank you!!

*** Don't give up hope, just keep going forward ;-)

error with trigger

Hi ,
I have created a trigger as follows :
========================================
=========================
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER trigger Usr_Trig_GL53
ON Gl530106
FOR INSERT , UPDATE
NOT FOR REPLICATION
AS
IF UPDATE(GL53001) OR UPDATE(GL53003) or UPDATE(GL53004)
-- this is an update
BEGIN
UPDATE b
SET b.[GL53001] = a.[GL53001] , b.[GL53003] = a.[GL53003] , b.[GL53004] = a.
[GL53004]
FROM inserted as a INNER JOIN ALTIRISSERVER.ScalaDB_SGO_TEST.dbo.Gl530106
as b ON a.GL53001 = b.GL53001
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
========================================
=========================
however when i made some modifications i was prompted the follow error
message
"another user has modified the contents of this table or view ; the database
row you are modifying no longer exists in the database .
Database Error : [Microsoft][ODBC Server Driver][SQL Server][OLD/DB provider
returned Message : New transaction cannot enlist in the specified transactio
n
coordinator ]
[Microsoft][ODBC Server Driver][SQL Server][ The operation cannot be
performed because the OLD DB Provider 'SQLOLEDB' was unable to begin a
distributed transaction "
Is this due to any services that not running ? --> i have started the SQL
Server Agent and the DTC from SQL EM
i am using SQL Standard Edition sp3 but this test wqas carried out from my
machine which is installed with MSDE2000
appreciate ur advise
tks & rdgs
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200603/1Hi,
I guess there is no primary key on the table whereas SQL Server could
decide what row to update there, so put a primary key on the table you
want to access / update and that should be fine. If you want to change
a view on the remote server, make sure that the view is updateable,
otherwise the row cannot be changed either.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||Hi,
I guess there is no primary key on the table whereas SQL Server could
decide what row to update there, so put a primary key on the table you
want to access / update and that should be fine. If you want to change
a view on the remote server, make sure that the view is updateable,
otherwise the row cannot be changed either.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||Hi ,
I have added PK to both the source & destination table but i still have the
same error
appreciate ur advice
tks & rdgs
Jens wrote:
>Hi,
>I guess there is no primary key on the table whereas SQL Server could
>decide what row to update there, so put a primary key on the table you
>want to access / update and that should be fine. If you want to change
>a view on the remote server, make sure that the view is updateable,
>otherwise the row cannot be changed either.
>HTH, Jens Suessmeyer.
>--
>http://www.sqlserver2005.de
>--
Message posted via http://www.webservertalk.com

Wednesday, March 7, 2012

Error with opening the connection

I have created my query to do what it needs to do but i'm getting error when i click the button, it says there is an error opening my connectiong...

I.E.

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Source Error:

Line 28: Line 29: //open the connectionLine 30: myConnection.Open();Line 31: Line 32: //create a command


Source File:c:\Documents and Settings\plan\PlanDatabase\BZAvuAdd.aspx.cs Line:30

Stack Trace:

[SqlException (0x80131904): Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +171 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2305 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +34 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +606 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +502 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +512 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89 System.Data.SqlClient.SqlConnection.Open() +160 _Default.insertIntoVU() in c:\Documents and Settings\plan\PlanDatabase\BZAvuAdd.aspx.cs:30 _Default.addAppButton_Click(Object sender, EventArgs e) in c:\Documents and Settings\plan\PlanDatabase\BZAvuAdd.aspx.cs:127 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +98 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4919

therefor is this saying that I have to login before even testing this thing or what??

Can you post the rest of your connection code?

|||

yeah...if you want html let meknow

here is the c#

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Data.SqlClient;

publicpartialclass_Default : System.Web.UI.Page

{

protectedvoid Page_Load(object sender,EventArgs e)

{

String parcel = (String)Session["parcelNumber"];

parcelNumLabel.Text = parcel;

}

protectedvoid insertApplicant()

{

//create the connection object

SqlConnection myConnection =newSqlConnection();

//set the connection string

myConnection.ConnectionString =ConfigurationManager.ConnectionStrings["MRDDstringConnection"].ConnectionString;

//open the connection

myConnection.Open();

//create a command

SqlCommand myCommand =newSqlCommand();//for data entry into applicant table

//***set the query text to the name of a stored procedure

myCommand.CommandText ="SELECT FirstName, LastName, Line1, Line2, City, State, Zip, PhoneNum FROM Applicant WHERE FirstName = @.fname, LastName = @.lname, Line1 = @.line1, Line2 = @.line2, City = @.city, State = @.state, Zip = @.zip, PhoneNum = @.phone";

/*

//***set the command type, stored procedure

myCommand.CommandType = CommandType.StoredProcedure;

*/

//create an input parameter

SqlParameter firstName =newSqlParameter();

firstName.ParameterName ="@.firstName";

firstName.SqlDbType =SqlDbType.Char;

firstName.Size = 10;

firstName.Value = ApplicantFirst.Text;//set the first name from text box

//create an input parameter

SqlParameter lastName =newSqlParameter();

lastName.ParameterName ="@.lastName";

lastName.SqlDbType =SqlDbType.Char;

lastName.Size = 20;

lastName.Value = ApplicantLast.Text;//set the last name from text box

//create an input parameter

SqlParameter line1 =newSqlParameter();

line1.ParameterName ="@.line1";

line1.SqlDbType =SqlDbType.Char;

line1.Size = 75;

line1.Value = ApplicantLine1.Text;//set the 1 line of address from text box

//create an input parameter

SqlParameter line2 =newSqlParameter();

line2.ParameterName ="@.line2";

line2.SqlDbType =SqlDbType.Char;

line2.Size = 75;

line2.Value = ApplicantLine2.Text;//set the 2 line of address from text box

//create an input parameter

SqlParameter city =newSqlParameter();

city.ParameterName ="@.city";

city.SqlDbType =SqlDbType.Char;

city.Size = 25;

city.Value = ApplicantCity.Text;//set the city from text box

//create an input parameter

SqlParameter state =newSqlParameter();

state.ParameterName ="@.state";

state.SqlDbType =SqlDbType.Char;

state.Size = 2;

state.Value = ApplicantState.SelectedItem;//set the state from text box

//create an input parameter

SqlParameter zip =newSqlParameter();

zip.ParameterName ="@.zip";

zip.SqlDbType =SqlDbType.BigInt;

zip.Size = 8;

zip.Value = ApplicantZip.SelectedItem;//set the zip code from text box

//create an input parameter

SqlParameter phone =newSqlParameter();

phone.ParameterName ="@.phone";

phone.SqlDbType =SqlDbType.Char;

phone.Size = 14;

phone.Value = ApplicantPhone.Text;//set the phone number from text box

//add the parameters

myCommand.Parameters.Add(firstName);//inserts first name into table

myCommand.Parameters.Add(lastName);//inserts last name into table

myCommand.Parameters.Add(line1);//inserts line1 of address into table

myCommand.Parameters.Add(line2);//inserts line2 of address into table

myCommand.Parameters.Add(city);//inserts city into table

myCommand.Parameters.Add(state);//inserts state into table

myCommand.Parameters.Add(zip);//inserts zip code into table

myCommand.Parameters.Add(phone);//inserts ohone number into table

//associate a connection with a command

myCommand.Connection = myConnection;

//execute the query

myCommand.ExecuteNonQuery();

//give back all resources

myCommand.Dispose();

myConnection.Dispose();

testlabel.Text ="Successful";

}

protectedvoid insertVofU()

{

//create the connection object

SqlConnection myConnection =newSqlConnection();

//set the connection string

myConnection.ConnectionString =ConfigurationManager.ConnectionStrings["MRDDstringConnection"].ConnectionString;

//open the connection

myConnection.Open();

//create a command

SqlCommand myCommand =newSqlCommand();//for data entry into Variance of use Table

//***set the query text to the name of a stored procedure

myCommand.CommandText ="SELECT BZAcaseNum, CurrentUse, ProposedUse, Comments FROM VarianceOfUse WHERE BZAcaseNum = @.caseNum, CurrentUse = @.current, ProposedUse = @.proposedUse, Comments = @.comments";/*

//***set the command type, stored procedure

myCommand.CommandType = CommandType.StoredProcedure;

*/

/*>>>>>

>>>>>>> //create an input parameter

>>>>>>> SqlParameter caseNum = new SqlParameter();

CaseNum caseNum.ParameterName = "@.caseNum";

>>>>>>> caseNum.SqlDbType = SqlDbType.Char;

>>>>>>> caseNum.Size = 10;

>>>>>>> caseNum.Value = ApplicantFirst.Text; //set the BZA Case Number Automatically

>>>>>>> */

//create an input parameter

SqlParameter current =newSqlParameter();

current.ParameterName ="@.current";

current.SqlDbType =SqlDbType.Char;

current.Size = 100;

current.Value = currentUse.Text;//set the current use from text box

//create an input parameter

SqlParameter proposedUse =newSqlParameter();

proposedUse.ParameterName ="@.proposedUse";

proposedUse.SqlDbType =SqlDbType.Char;

proposedUse.Size = 500;

proposedUse.Value = proposedUseText.Text;//set the proposed use from text box

//create an input parameter

SqlParameter comments =newSqlParameter();

comments.ParameterName ="@.comments";

comments.SqlDbType =SqlDbType.Char;

comments.Size = 500;

comments.Value = whyText.Text;//set the comments from text box

//add the parameters

//>>>>> myCommand.Parameters.Add(caseNum); //inherits BZA Case Number

myCommand.Parameters.Add(current);//inserts currentUse into table

myCommand.Parameters.Add(proposedUse);//inserts proposedUse into table

myCommand.Parameters.Add(comments);//inserts comments into table

//associate a connection with a command

myCommand.Connection = myConnection;

//execute the query

myCommand.ExecuteNonQuery();

//give back all resources

myCommand.Dispose();

myConnection.Dispose();

testlabel.Text ="Successful2";

}

protectedvoid addAppButton_Click(object sender,EventArgs e)

{

insertApplicant();

insertVofU();

}

|||

First, put some debug code in that checks your connection string:

ConfigurationManager.ConnectionStrings["MRDDstringConnection"].ConnectionString;

If this is null (meaning the connection string does not exist for your current application), this is something you will need to fix. Also, make sure it has a username/password.

The third thing to check is how you are logging in. If this is a SQL Server, you may have Mixed Mode Authentication turned off for the database. You might be able to log in fine using Windows Authentication Mode, but remote applications will not be able to access the database until Mixed Mode Authentication is turned on.

You can read more about it here:

http://support.microsoft.com/kb/889615

Hope this helps.

|||<addname ="MRDDstringConnection"connectionString="server = khazad-dum; database = mrdd3;"providerName="System.data.SqlClient"/>

</connectionStrings>

that is the HTML i used for creating the connection string is something wrong in there?

|||

i found the problem in my html.....didn't work at all so thanks for all the help you got me started in the right direction

|||

Text should be:

<connectionStrings> <addname="MRDDstringConnection"connectionString="Data Source=khazad-dum;Initial Catalog=mrdd3;Persist Security Info=True;User ID=<username here>;Password=<password here>"providerName="System.Data.SqlClient" />

</connectionStrings>

Once you have this in your web.config file, you'll need to make sure you have Mixed Mode Authentication turned on. In SQL Server 2005, you can do this by right-clicking the server, go to Properties, select Security, and make sure "SQL Server and Windows Authentication Mode" is selected.

** PLEASE NOTE: You will have to put a username and password in the connection string above.

|||

i put in the username and password and it doesn't work it says i can't login...i know the username and password are correct...where is it checking for the user name and password cause my administrators are idiots...and they don't know what they are doing so i'm trying to figure out this part....

|||

Check to make sure Mixed Mode Authentication is turned on. What are you using for a back-end? SQL Server 2005?

|||

yes...the back end is SQL server 2005, and mixed-mode is turned on...and i created my username in the enterprise manage and set the permissions to the owner of the db....withouth the username and password i had it successfully going through with no errors, but it wasn't writting so now once the database knows its my user name i will be able to write to it...i'm lost at this point

|||

Are IIS, the .NET Framework and the SQL Server all running on the same machine? If so, make sure you are using a login that exists on the SQL Server (open SQL Server Management Studio and look under Security -> Logins).

The only reason you should get a Login failed for user '(null)' is:
1) there was no login ID supplied
2) the login ID supplied does not exist as a SQL Server login
3) mixed mode authentication is off

If mixed mode authentication is on, and you are supplying a login ID, we should start looking at the existing logins under SQL Server.

|||

ok, when i go look in the Enterprise manager the login name I'm currently under (MIRKWOOD\plan) that is the login name that shows up on the logins page, now i don't have to include MIRKWOOD in the html portion becuase of the fact that MIRKWOOD is the server name...but i tried just regular (plan) i tried (MIRKWOOD\plan), i tried it with the password i use, and without the password i use...none of them work...i have no clue...and the mixed mode authentication is on....also in the security tab it says "Audit Level" - "None" checked, "Ownership Chairing" - not checked, "Start and Run SQL server in the following account" - its a totally different user name and password i've seen....is that where the problem is?? maybe this will help you...sorry for being a hassel...i've just never delt with this before

|||

Put this in your web.config file (replace your old connection string):

<addname="MRDDstringConnection"connectionString="Data Source=<servername here>;Initial Catalog=<database name here>;Persist Security Info=True;User ID=<username here>;Password=<password here>"providerName="System.Data.SqlClient" />

You will have to change the Uesr ID and Password to a login you know exists.

I have to admit I am a bit confused. Earlier, it looked like you were trying to connect to a server named "khazad-dum" (neat Babylon 5 reference, by the wayCool) and a database named "mrdd3", but now it appears you are trying to connect to a server named "MIRKWOOD" and a database named "plan".

The User ID and Password would be the login as it exists in SQL Management Studio.

|||

I am trying to connect to a server name Khazad-Dum...that is where SQL server is located and my database...but my user name and password come from this other server name mirkwood....when i look in the security tab and then logins there is one under there called "MIRKWOOD\plan" now i'm almost 100% positive that is my login name but when i put it in my code it says that the name does not exist..really wierd...and my admin has no clue how he names stuff so i'm stuck here trying to figure this out...ughhh...if you have anymore suggestions that would be great...thanks for the help you have provided so far i understand everything you are saying and how it goes...i'm assuming it is the naming sequence...

|||

I am trying to connect to a server name Khazad-Dum...that is where SQL server is located and my database...but my user name and password come from this other server name mirkwood....when i look in the security tab and then logins there is one under there called "MIRKWOOD\plan" now i'm almost 100% positive that is my login name but when i put it in my code it says that the name does not exist..really wierd...and my admin has no clue how he names stuff so i'm stuck here trying to figure this out...ughhh...if you have anymore suggestions that would be great...thanks for the help you have provided so far i understand everything you are saying and how it goes...i'm assuming it is the naming sequence...in fact here is the html i'm using now...and still getting the error...

<addname="MRDDstringConnection"connectionString="Data Source=KHAZAD-DUM;Initial Catalog=mrdd3;Persist Security Info=True;User ID = \mirkwood\plan; Password=********"

providerName="System.Data.SqlClient" />

Error with ole db

I created a view refer to a visual foxpro with ole db for visual foxpro which was working fine before. But now, I received an error while select the view

Msg 7302, Level 16, State 1, Line 1
Cannot create an instance of OLE DB provider "VFPOLEDB" for linked server "ORST3".

Please advise. Thanks in advance


Can you provide us with sample repro code for this issue?

Thanks

Sunday, February 26, 2012

Error with Bit datatype.

I created a table called "test" with only one column of bit data type.

I opened the table using management studio and tried to enter the number "1" It is throwing the below error

Microsoft SQL Server Management Studio

Invalid value for cell (row 1, column 1).

The changed value in this cell was not recognized as valid.
.Net Framework Data Type: Boolean
Error Message: String was not recognized as a valid Boolean.

Type a value appropriate for the data type or press ESC to cancel the change.

OK Help

But when I enter true or false it accepts it as a valid value.

When I execute the query
insert into test values (1)
the insert goes fine.

I opened table via management studio I am seeing "true" "false" as values in the table.
When I do a select in the query analyzer I am getting "1" and "0" as results.

Is this the way it is indented to work?

Santhosh

Here is my take...

When SSMS (written in VS.NET) opens a table, it is using a datagrid -and the datagrid is converting to a boolean because VS.NET doesn't have a bit datatype.

If you open a query window, and execute a SQL query that returns the data from the table, you will see that the data is indeed stored as a bit datatype [ 0/1/NULL ].

|||Arnie,
Thanks for the reply. Doesnt it sound stupid?|||I agree that there could be a bit more information available about how SSMS is working behind the scenes.|||Thats because the different UIs are owned by different groups at MS. They *might* get aligned in the future.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

Error with asp admin/logins on live server

I have created a site using VWDExpress and now that I've finished testing have moved it over to the server which runs SQLServer 2000. Part of the site requires login, so I created the membership using the ASP.net web configuration tool and when testing locally worked well.

Now though that I've copied the web site over, when I try to log in I get the error:

System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

Obviously its some sort of configuration issue, but I don't know what.

What do I have to change to make this work from a test machine to a live server?


Thanks

Have you configured your machine.config and web.config on the live server (where you have SQL Server 2000) to work with SQL Server 2000 because by default it looks for SQL Server 2005?

bullpit

|||

bullpit:

Have you configured your machine.config and web.config on the live server (where you have SQL Server 2000) to work with SQL Server 2000 because by default it looks for SQL Server 2005?

bullpit

I ran through the steps listed here http://msdn2.microsoft.com/en-us/library/aa479307.aspx but it gets to a point and says"The easiest way to have your application take advantage or your newly created database is just to replace he connection string value of this localSQLServer setting in your apps web.config". The problem i have is that i dont know what or how to modify?

Now though Im getting the errorSystem.ArgumentException: Invalid value for key 'attachdbfilename' when i try to access the database even though it appears to point to a valid DB file (i.e.

data source=SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true)

thanks for any assistance

|||

Ok...Lets start from the beginning. What my understanding is that your dev server had SQL Server Express edition and your live server has SQL Server 2000. Now, if you have not changed any configuration settings in config files, heres what you have to do. Make sure you have ASPNETDB in SQL Server 2000. If not, locate aspnet_regsql.exe in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 and run it.

Now: Locate machine.config.

If Windows Server 2000 is your live server, then it will be located in C:\WINNT\Microsoft.NET\Framework\v2.0.50727\CONFIG

Modify <connectionStrings> tag like this. I commented the default string just in case it gets messed up. Also, make a copy of machine.config before altering it.

<connectionStrings><!-- <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>--><add name="LocalSqlServer" connectionString="YOUR CONNECTION STRING TO SQL SERVER 2000 ASPNETDB"/> </connectionStrings> Then: add this connectionString in your application web.config file:<add name="LocalSqlServer" connectionString="YOUR CONNECTION STRING TO SQL SERVER 2000 ASPNETDB"/>Add the following tags just before your </system.web> tag<membership> <providers><remove name="AspNetSqlMembershipProvider"/> <add name="AspNetSqlMembershipProvider"type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"connectionStringName="LocalSqlServer"enablePasswordRetrieval="false"enablePasswordReset="true"requiresQuestionAndAnswer="true"applicationName="/YOUR APPLICATION NAME" MAKE SURE TO CHANGE THE NAME TO YOUR APPLICATION NAMErequiresUniqueEmail="false"passwordFormat="Hashed"maxInvalidPasswordAttempts="5"minRequiredPasswordLength="7"minRequiredNonalphanumericCharacters="1"passwordAttemptWindow="10"passwordStrengthRegularExpression="" /> </providers></membership> <profile><providers> <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/"type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers></profile>

Try this and let me know if you are getting anywhere.

Good luck...

bullpit

|||

bullpit:

Make sure you have ASPNETDB in SQL Server 2000. If not, locate aspnet_regsql.exe in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 and run it.

Seems as though im falling at the first hurdle then! The database isn't in SQLServer at all, because it was created using the ASP web admin tool and resides in the \app_data\ folder of my site. I have copied this to the server but obviously SQLServer doesn't pick it up. If i run the aspnet_regsql tool then its not in the drop-down list of databases to intialise.

Im not sure how to proceed now to get it in SQLServer 2000.

Thanks for all the help btw.

|||

Lets try this:

Just go thru all the default steps of the wizard, leave the value as <default> in dropdown and click next, verify in the last step that the wizard is creating ASPNETDB. click finish. see if this helps.

good luck...

bullpit

|||

bullpit:

Lets try this:

Just go thru all the default steps of the wizard, leave the value as <default> in dropdown and click next, verify in the last step that the wizard is creating ASPNETDB. click finish. see if this helps.

good luck...

bullpit

It Did, Thanks!I now have a blank aspnetdb showing in SQLServer 2000 and another (populated with users and passwords) in the \app_data folder.

How do i go aobut moving from one to the other?

|||

elDeeJay:

bullpit:

Lets try this:

Just go thru all the default steps of the wizard, leave the value as <default> in dropdown and click next, verify in the last step that the wizard is creating ASPNETDB. click finish. see if this helps.

good luck...

bullpit

It Did, Thanks!I now have a blank aspnetdb showing in SQLServer 2000 and another (populated with users and passwords) in the \app_data folder.

How do i go aobut moving from one to the other?

I should have said,

How do i go about moving from one to the other and getting the membership pages created with the ASP web based management tool to recognise this new database location??

Thanks again

|||

You have to configure web.config and machine.config for that. I have already explained that earlier.

bullpit

|||

bullpit:

You have to configure web.config and machine.config for that. I have already explained that earlier.

bullpit

OK, so I deployed my database using this guide (http://weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx) and now the SQLServer 'sees' the database. I updated my web.config to point to the database on the server and now the login page loads. However, when i go to login, its telling me the login is rejected, for ALL the users, even though i know the login details are correct.

Also, if the data is in the SQLServer database, but the details are encrypted, how do i go about adding new users etc?

I can't belive the process is this coplex. I would have thought it would know the database is in the \app_data\ folder and copying this over would have been sufficient, whatever host it was running on! :(

|||

Well...copying is not the same is copy-paste operation in Windows plateforms. You have to detach the database and then attach it to the new DBMS. Can you paste your web.config please so that I can see what setting you have?

bullpit

|||Certainly (and i really appreciate the time you are giving up to help btw)

123<!--45 Note: As an alternative to hand editing this file you can use the67 web admin tool to configure settings for your application. Use89 the Website->Asp.Net Configuration option in Visual Studio.1011 A full list of settings and comments can be found in1213 machine.config.comments usually located in1415 \Windows\Microsoft.Net\Framework\v2.x\Config1617-->1819<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">2021 <appSettings/>2223 <connectionStrings>2425 <remove name="LocalSqlServer" />2627 <add name="ENQConnectionString" connectionString="Data Source=WEBSERVER;Initial Catalog=ENQUIRIES;Integrated Security=True" providerName="System.Data.SqlClient" />2829 <add name="LocalSqlServer" connectionString="Data Source=WEBSERVER;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient" />3031 </connectionStrings>3233 <system.web>3435 <globalization culture="en-GB" uiCulture="en-GB" />3637 <roleManager enabled="true" />3839 <authentication mode="Forms" />4041 <pages styleSheetTheme="DataWebControls"/>4243<!--4445 Set compilation debug="true" to insert debugging4647 symbols into the compiled page. Because this4849 affects performance, set this value to true only5051 during development.5253 -->5455 <compilation debug="true" defaultLanguage="c#">5657 <assemblies>5859 <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />6061 <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />6263 <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />6465 </assemblies>6667 </compilation>6869 <customErrors mode="Off"/>7071<!--7273 The <authentication> section enables configuration7475 of the security authentication mode used by7677 ASP.NET to identify an incoming user.7879 -->8081 <!--8283 The <customErrors> section enables configuration8485 of what to do if/when an unhandled error occurs8687 during the execution of a request. Specifically,8889 it enables developers to configure html error pages9091 to be displayed in place of a error stack trace.92939495 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">9697 <error statusCode="403" redirect="NoAccess.htm" />9899 <error statusCode="404" redirect="FileNotFound.htm" />100101 </customErrors>102103 -->104105 <httpHandlers>106107 <remove verb="*" path="*.asmx"/>108109 <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>110111 <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>112113 <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364E35" validate="false"/>114115 </httpHandlers>116 <httpModules>117 </httpModules>118<membership>119120<providers>121122<remove name="AspNetSqlMembershipProvider"/>123124<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"125126connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true"127128applicationName="/ETS" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"129130minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />131132</providers>133134</membership>135136<profile>137138<providers>139140<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />141142</providers>143144</profile>145146</system.web>147148</configuration>149
|||

You are welcome.

Modify the authentication and authorization tags to something like this:

<authentication mode="Forms"><forms name="appNameAuth" path="/" loginUrl="Login.aspx" protection="All" timeout="999999"> </forms></authentication><authorization> <deny users="?" /> </authorization>
good luck.
bullpit

|||

bullpit:

You are welcome.

Modify the authentication and authorization tags to something like this:

<authentication mode="Forms">
<forms name="appNameAuth" path="/" loginUrl="Login.aspx" protection="All" timeout="999999">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
good luck.
bullpit

Thanks, replaced <authentication mode="Forms" /> with the code above but the exact same problem persists.

|||

Now I am not sure what the problem is. For creating users in your database, you can use the ASP.NET configuration tool to create and manage users, roles and other things. For me, for some reason, Create User option does not work, everything else works though. So what I do is add a temporary web page to my application with just a CreateUserWizard control on it, create a user, and then remove it from the project. For everything else, theres Master Card (ASP.NET Tool)

bullpit

Friday, February 24, 2012

Error while trying to execute a user defined function

Hi,

I'm working on SQL SERVER 2005 Standard edition.

I created a user defined function on the dbo schema.

Is it possible to invoke a user defined function in a select clause only with the name of this function without precising the name of the schema.

if my function is called TOTO(), can i execute the command :

SELECT TOTO()

go

Actually when i try to execute this command i have the following error message :

Message 195, level 15, state 10 :

'TOTO' is not a known built-in function name option.

Can someone help me to solve this issue ?

try

select dbo.toto()

|||

I know that it works but i want to know if it's possible to execute this function without specifying the schema just like this :

SELECT toto()

go

|||

Locolito:

The response to your question is no: WIth a scalar function you must supply the "schema" qualifier -- such as dbo; however, the schema qualifier is not required with a table function.


Dave

Error while trying to create a new connection in Visual C# Express 2005

Hi, the other day i decided to download and install C# Express and SQL Server Express 2005. I created a new project in C# Express then I decided to practice with database connectivity so I tried to create a new connection, in the wizard I specified SQL Server Authentication, typed the user name and password and when I pushed the button "Test Connection" I recieve this error message "Failed to generate a user instance of SQL Server. Only an integrated connection can generate a user instance. The connection will be closed". I also have tried Windows Autentication, but it displays a more complex error that says something about the database file being used by other process. I have been trying to solve this problem, but nothing works. I think I need some help.Tongue TiedSad

While adding a Data Source in VB2005EE I also got this error which you received:

"Failed to generate a user instance of SQL server. Only an integrated connection can generate a user instance. The connection will be closed."

Solution that worked for me:

On the "Add Connection" Dialog, click the "Advanced" Button. Go to the Property "User Instance" under "Source". Change the value to "False" & you are done.

Error while trying to create a new connection in Visual C# Express 2005

Hi, the other day i decided to download and install C# Express and SQL Server Express 2005. I created a new project in C# Express then I decided to practice with database connectivity so I tried to create a new connection, in the wizard I specified SQL Server Authentication, typed the user name and password and when I pushed the button "Test Connection" I recieve this error message "Failed to generate a user instance of SQL Server. Only an integrated connection can generate a user instance. The connection will be closed". I also have tried Windows Autentication, but it displays a more complex error that says something about the database file being used by other process. I have been trying to solve this problem, but nothing works. I think I need some help.Tongue TiedSad

While adding a Data Source in VB2005EE I also got this error which you received:

"Failed

to generate a user instance of SQL server. Only an integrated

connection can generate a user instance. The connection will be closed."

Solution that worked for me:

On

the "Add Connection" Dialog, click the "Advanced" Button. Go to the

Property "User Instance" under "Source". Change the value to "False"

& you are done.

Error while taking BackUp of a database in SQL Express 2005

I installed MSDE2000 initially, and later upgraded to SQL Express 2005.

Then I created a database"CGQA00032" in SQL Express 2005.

On taking the BackUp of the database using T-SQL command:

BACKUP DATABASE CGQA00032 to disk = 'CGQA00032.bak'

I got the following Message when I run this query in Managemant Studio :

<<<<<<<<<<<<<<<<<<<<<<<<<<<

Processed 672 pages for database 'iwdm_CGQA00032_V4', file 'iWDM_CGQA00032_V4_Data' on file 4.
Processed 1 pages for database 'iwdm_CGQA00032_V4', file 'iWDM_CGQA00032_V4_Log' on file 4.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'mirror_count'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_password_protected'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'mirror'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_password_protected'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'recovery_model'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'has_bulk_logged_data'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_snapshot'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_readonly'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_single_user'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'has_backup_checksums'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_damaged'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'begins_log_chain'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'has_incomplete_metadata'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_force_offline'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_copy_only'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'first_recovery_fork_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'last_recovery_fork_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'fork_point_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'database_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'family_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'state'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'state_desc'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'create_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'drop_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'file_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'read_only_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'read_write_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'backup_size'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'filegroup_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_readonly'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_present'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'state'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'state_desc'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'create_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'drop_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'file_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'read_only_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'read_write_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'backup_size'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'filegroup_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_readonly'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_present'.
Msg 3009, Level 16, State 1, Line 1

Could not insert a backup or restore history/detail record in the msdb database. This may indicate a problem with the msdb database. The backup/restore operation was still successful.

BACKUP DATABASE successfully processed 673 pages in 2.141 seconds (2.575 MB/sec).
2

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

1. What is the problem with msdb database?

2. Is it a problem of upgrading through a previous version of SQL Server?

3. Is there any Service Pack available to overcome such problem?

Please help ASAP.

Best Regards,

Vishal Gawai

Moving to Engine forum|||

It seems that when you upgrade MSDE to SQL Server Express 2005 RTM the msdb database is not upgraded.

See: http://support.microsoft.com/kb/914781/en-us

The columns you are seeing complained about are columns added to the backup* tables in msdb in SQL Server 2005.

Apparently this was addressed in SP1 so you need to apply either SQL Server Express SP1 or SQL Server Express SP2 to your SQL Server Express installation.

|||

Thank you for ur help.

I would like to know one more thing:

When I tried the above problem on French version of SQL Server 2005 Express Ed.

I recieved SQL server native error 4035 . (Message :: Processed 672 pages for database........)

Is this because of the above reason as explained?

Becasue this error does not occur on English version of SQL Server 2005 Express.

Regards,

Vishal

|||

vishalg wrote:

I recieved SQL server native error 4035 . (Message :: Processed 672 pages for database........)

This is a confusion where the word error is used for any messages. If you look at the severity of the message you will see that it is 10. This means that it is an informational message and not an error at all.

As for why you don't see the error in the French version.

Checking at the download site. The English edition of SQL Server 2005 Express Edition was released 7 November 2005. The French edition was released 25 January 2006. They probably included available critical fixes in the release (ahead of SP1) and this problem was probably both picked up quite quickly after release, and relatively easy to address (as the update code for msdb was available just not enabled/included).

Error while taking BackUp of a database in SQL Express 2005

I installed MSDE2000 initially, and later upgraded to SQL Express 2005.

Then I created a database"CGQA00032" in SQL Express 2005.

On taking the BackUp of the database using T-SQL command:

BACKUP DATABASE CGQA00032 to disk = 'CGQA00032.bak'

I got the following Message when I run this query in Managemant Studio :

<<<<<<<<<<<<<<<<<<<<<<<<<<<

Processed 672 pages for database 'iwdm_CGQA00032_V4', file 'iWDM_CGQA00032_V4_Data' on file 4.
Processed 1 pages for database 'iwdm_CGQA00032_V4', file 'iWDM_CGQA00032_V4_Log' on file 4.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'mirror_count'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_password_protected'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'mirror'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_password_protected'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'recovery_model'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'has_bulk_logged_data'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_snapshot'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_readonly'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_single_user'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'has_backup_checksums'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_damaged'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'begins_log_chain'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'has_incomplete_metadata'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_force_offline'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_copy_only'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'first_recovery_fork_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'last_recovery_fork_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'fork_point_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'database_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'family_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'state'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'state_desc'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'create_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'drop_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'file_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'read_only_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'read_write_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'backup_size'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'filegroup_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_readonly'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_present'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'state'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'state_desc'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'create_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'drop_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'file_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'read_only_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'read_write_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_lsn'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'differential_base_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'backup_size'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'filegroup_guid'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_readonly'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'is_present'.
Msg 3009, Level 16, State 1, Line 1

Could not insert a backup or restore history/detail record in the msdb database. This may indicate a problem with the msdb database. The backup/restore operation was still successful.

BACKUP DATABASE successfully processed 673 pages in 2.141 seconds (2.575 MB/sec).
2

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

1. What is the problem with msdb database?

2. Is it a problem of upgrading through a previous version of SQL Server?

3. Is there any Service Pack available to overcome such problem?

Please help ASAP.

Best Regards,

Vishal Gawai

Moving to Engine forum|||

It seems that when you upgrade MSDE to SQL Server Express 2005 RTM the msdb database is not upgraded.

See: http://support.microsoft.com/kb/914781/en-us

The columns you are seeing complained about are columns added to the backup* tables in msdb in SQL Server 2005.

Apparently this was addressed in SP1 so you need to apply either SQL Server Express SP1 or SQL Server Express SP2 to your SQL Server Express installation.

|||

Thank you for ur help.

I would like to know one more thing:

When I tried the above problem on French version of SQL Server 2005 Express Ed.

I recieved SQL server native error 4035 . (Message :: Processed 672 pages for database........)

Is this because of the above reason as explained?

Becasue this error does not occur on English version of SQL Server 2005 Express.

Regards,

Vishal

|||

vishalg wrote:

I recieved SQL server native error 4035 . (Message :: Processed 672 pages for database........)

This is a confusion where the word error is used for any messages. If you look at the severity of the message you will see that it is 10. This means that it is an informational message and not an error at all.

As for why you don't see the error in the French version.

Checking at the download site. The English edition of SQL Server 2005 Express Edition was released 7 November 2005. The French edition was released 25 January 2006. They probably included available critical fixes in the release (ahead of SP1) and this problem was probably both picked up quite quickly after release, and relatively easy to address (as the update code for msdb was available just not enabled/included).

Sunday, February 19, 2012

Error while running service

Hi,
I have created .net windows service for running an exe. Exe is running
fine. It is used for inserting xml data in sql server database.
My service mode is automatic. Whenevr i start my computer it is
throwing me an error below :-
"An unhandled exception of type 'system.data.sqlclient.sqlexception'
occured in system.data.dll.
Additinal information : A connection was successfully established with
the server.but then an error occured during prelogin handshake.
(provider - SSL provider , error : 0 - the messege or signature
provided for verification has been altered"
When i start service in manual mode it runs perfectly fine. Can
someone please help me in this regard?
Arati
On Jul 31, 8:33 am, JPD <nos...@.nospamplease.com> wrote:
> Hi Arati,
> I've seen a similar problem just last week. In that case we deleted all
> certificates on the server and everything worked perfectly.
> Jonathan
>
> Arati wrote:
>
>
>
> - Show quoted text -
Hi,
Are you talking about server certificates for IIS or sql server?
Regards,
Arati
|||On Aug 2, 6:30 am, Jonathan Psaila-Depasquale
<nos...@.nospamplease.com> wrote:
> Hi Arati,
> You have delete all existing certificates on the server no matter what
> purpose they are serving. In the case I encountered last week the
> problem certificate was for SharePoint.
> Jonathan
>
> Arati wrote:
>
>
>
> - Show quoted text -
Hi,
There are no certificates for IIS server. And I don't know where I can
find certificate for sql server. Do you have any idea on this?
Regards,
Arati

Error while running service

Hi,
I have created .net windows service for running an exe. Exe is running
fine. It is used for inserting xml data in sql server database.
My service mode is automatic. Whenevr i start my computer it is
throwing me an error below :-
"An unhandled exception of type 'system.data.sqlclient.sqlexception'
occured in system.data.dll.
Additinal information : A connection was successfully established with
the server.but then an error occured during prelogin handshake.
(provider - SSL provider , error : 0 - the messege or signature
provided for verification has been altered"
When i start service in manual mode it runs perfectly fine. Can
someone please help me in this regard?
AratiHi Arati,
I've seen a similar problem just last week. In that case we deleted all
certificates on the server and everything worked perfectly.
Jonathan
Arati wrote:
> Hi,
> I have created .net windows service for running an exe. Exe is running
> fine. It is used for inserting xml data in sql server database.
> My service mode is automatic. Whenevr i start my computer it is
> throwing me an error below :-
> "An unhandled exception of type 'system.data.sqlclient.sqlexception'
> occured in system.data.dll.
> Additinal information : A connection was successfully established with
> the server.but then an error occured during prelogin handshake.
> (provider - SSL provider , error : 0 - the messege or signature
> provided for verification has been altered"
> When i start service in manual mode it runs perfectly fine. Can
> someone please help me in this regard?
> Arati
>|||On Jul 31, 8:33 am, JPD <nos...@.nospamplease.com> wrote:
> Hi Arati,
> I've seen a similar problem just last week. In that case we deleted all
> certificates on the server and everything worked perfectly.
> Jonathan
>
> Arati wrote:
>
>
>
>
>
>
> - Show quoted text -
Hi,
Are you talking about server certificates for IIS or sql server?
Regards,
Arati|||Hi Arati,
You have delete all existing certificates on the server no matter what
purpose they are serving. In the case I encountered last week the
problem certificate was for SharePoint.
Jonathan
Arati wrote:
> On Jul 31, 8:33 am, JPD <nos...@.nospamplease.com> wrote:
> Hi,
> Are you talking about server certificates for IIS or sql server?
> Regards,
> Arati
>|||On Aug 2, 6:30 am, Jonathan Psaila-Depasquale
<nos...@.nospamplease.com> wrote:
> Hi Arati,
> You have delete all existing certificates on the server no matter what
> purpose they are serving. In the case I encountered last week the
> problem certificate was for SharePoint.
> Jonathan
>
> Arati wrote:
>
>
>
>
>
>
> - Show quoted text -
Hi,
There are no certificates for IIS server. And I don't know where I can
find certificate for sql server. Do you have any idea on this?
Regards,
Arati|||Hi,
Open an MMC console. Go to File | Add/Remove Snap-in. Click on Add and
select Certificates. Choose Computer Account and then Local Computer.
Click Finish, Close, OK.
In the tree on the left expand Certificates (Local Computer), then click
on Personal. You need to delete all certificates that appear in the
details pane.
Jonathan
Arati wrote:
> On Aug 2, 6:30 am, Jonathan Psaila-Depasquale
> <nos...@.nospamplease.com> wrote:
> Hi,
> There are no certificates for IIS server. And I don't know where I can
> find certificate for sql server. Do you have any idea on this?
> Regards,
> Arati
>