Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Thursday, March 22, 2012

ASP Connections to SQL Server 2000

I am receiving the following error message when attempting to connect to SQL Server 2000.

Please help me!

HERE'S THE ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::
------------------------

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.

HERE'S THE CODE USED::::::::::::::::::::::CODE:::::::::::::::::::: ::::::
------------------------

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, connHere is some great page for connection string...

http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForSQLServer|||You should open first the connection.

Try this:

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"
conn.Open

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

Originally posted by Terry Ward
I am receiving the following error message when attempting to connect to SQL Server 2000.

Please help me!

HERE'S THE ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::
------------------------

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.

HERE'S THE CODE USED::::::::::::::::::::::CODE:::::::::::::::::::: ::::::
------------------------

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

Tuesday, March 20, 2012

ASP .NET Web Site Administration Tool Problem

Hi,

I have a problem when I use ASP .NET Web Application Administration tool. When I click the Security tab, I receive following message

"There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem:Unable to connect to SQL Server database."

In the same page, there is a button to go to Provider section. I clicked it, and I went to the Provider page. There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider. There, there was a link, I clicked it and I receive following message:

"

Provider ManagementCould not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

"

After reading this message, I opened Command Prompt and went to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727. There, I ran the aspnet_regsql command, and then ASP .NET SQL Server Setup Wizard was displayed. In the first page of this wizard I chose "Configure SQL Server for application services" and then I clicked "Next" button. In the second page I left all fields as they were and then I clicke"Next". In the third page I only clicked "Next" and then some process ran. Finally, in the last page I received following message:

"

Setup failed.

Exception:
Unable to connect to SQL Server database.

------------
Details of failure
------------

System.Web.HttpException: Unable to connect to SQL Server database. --> 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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
-- End of inner exception stack trace --
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()
"

What should I do? I tried to use this administration tool on computer in my house and everything was just fine. Why do I have this problem in my office?

Hi,

It seems that you are not providing correct information about your SQL Server database on second page of that wizard. It should be properly pointing to the database which would be used by your application. When you have properly pointed it to that, it will then create some default tables and objects for you to use and enable this feature in your application.

|||

Yes, you are right! I made a mistake in step 2 of ASP .NET SQL Server Setup Wizard. Recently, I successfully went through all the steps. However, I still can't open the Security tab in ASP .NET Web Site Administration Tool. When I open the Provider section, I still receive the message below:

"

Provider ManagementCould not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

"

What should I do? I need to create a login functionality for my site in near future. Please help me...

|||

Hi haris101,

There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider.

Open your machine.config and search for "localsqlserver" connection string. The default is configured to use sql server express database. So, if you are not using sql express, you need to modify this "localsqlserver" connection string or specify a new connection string for the default provider.

I suggestion you read this walk-through first:http://msdn2.microsoft.com/en-us/library/879kf95c(VS.80).aspx

Hope my suggestion helps

|||

hey haris

im having the same problem -
i can get the web site to run queries
but i cant get the website administration to connect
did you ever find out the solution??
would love to know your experience

thanks
toy

|||

I'm also having a similar problem, I tried to connect the aspnet_regsql to my sql 2005 server on the network but it keeps telling me it can't connect. and i'm not sure why that is. I already have information for my web app stored in this server so i know that it is running just fine. if anyone can help that would be great, im running the vs 2005 pro with the 2.0 framework.

Thank,

Shane S.
FDOT

|||

Bo Chen – MSFT:

Hi haris101,

There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider.

Open your machine.config and search for "localsqlserver" connection string. The default is configured to use sql server express database. So, if you are not using sql express, you need to modify this "localsqlserver" connection string or specify a new connection string for the default provider.

I suggestion you read this walk-through first:http://msdn2.microsoft.com/en-us/library/879kf95c(VS.80).aspx

Hope my suggestion helps

Thanks Bo! You are right!Yes

For others who experience the same problem like mine, all you have to do is modify machine.config file in ...\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG (this is the default location). Scroll down until you find

<connectionStrings> <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /></connectionStrings>

What I did is changing the connection string to "Data Source=IT-HARIS\SQLEXPRESS;Integrated Security=True" since "IT-HARIS\SQLEXPRESS" is my SQL Server name and I use windows authentication to log on to this server. I hope this works for you too.


Best regards,

Haris

ASP & SQL Server 2000 Connection

I am receiving the following error message when attempting to connect to SQL Server 2000.

CODE::::::::::::::::::::::::CODE:::::::::::::::::: ::::::::

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.Add conn.Open before your rs.Open statement.

Regards,

Hugh Scott

Originally posted by Terry Ward
I am receiving the following error message when attempting to connect to SQL Server 2000.

CODE::::::::::::::::::::::::CODE:::::::::::::::::: ::::::::

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.

Thursday, March 8, 2012

AS2005 Cube Processing

I have problems with processing cubes on AS2005. I get this error message while processing:

Memory error: Allocation failure: Not enough storage is available to process this command. Error in the OLAP storage engine.

This machine has 6GB of memory and once it hits 3.5GB the processing stops. AWE is turned on.

I would appreciate, if anyone can help on this.

Thanks,

Gopal

Analysis Services is not AWE aware. So it can only use 2GB on a 32bit box (3GB if you have /3GB switch in boot.ini). Looks like the processing operation is running out of memory.

What are the number and sizes of dimension and partition tables? Do you have aggregations? Look at the processing log (in the process dialog) and find out what is the operation that causes out of memory - dimension processing, partition processing, building aggregations, etc.

This could also happen due to excessive parallelism. Try processing the dimensions and partitions individually.

|||

Thanks for your reply.

I managed to process the partitions and dimensions individually. That worked.

Gopal

|||

Hi.

Just a short question:

Is it really true that SSAS can use only 2GB RAM on a 32bit system? The technical reference for SQL Server 2005 Standard and Enterprise states that SQL Server can use the amount of RAM supported by the operating system which is 4GB for a Server 2003 Standard edition and 32GB for a Server 2003 Enterprise edition, both on 32bit systems. Does this apply only to the SQL Server Database Engine then and not the Analysis Services Server?

Regards

Kjetil

T.K. Anand wrote:

Analysis Services is not AWE aware. So it can only use 2GB on a 32bit box (3GB if you have /3GB switch in boot.ini). Looks like the processing operation is running out of memory.

What are the number and sizes of dimension and partition tables? Do you have aggregations? Look at the processing log (in the process dialog) and find out what is the operation that causes out of memory - dimension processing, partition processing, building aggregations, etc.

This could also happen due to excessive parallelism. Try processing the dimensions and partitions individually.

|||

In the 64-bit versions of Analysis Services...has this memory use limit been removed?

...cordell...

|||Yes - 64bit version doesn't have these limitations.

AS2000 problem!

We are developing a As 2000 solution and when processing the cube we get an Eventlog message 'The memory conversation threshold was exceeded by more then 12,5% for an extended period'!

Does anyone have any idea about this problem/issue?

Larra

Try upgrading to Service Pack 4. There was a similar issue reported against AS2000 SP3 that was fixed in SP4.

http://www.microsoft.com/downloads/info.aspx?na=22&p=1&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d8e2dfc8d-c20e-4446-99a9-b7f0213f8bc5%26DisplayLang%3den

Hope that helps.

Thursday, February 16, 2012

Arithmetic overflow error for data type smallint, value = 46080

Hello friends, in this moments I have a problem with my Ms Sql server 2000,
at the enterprise manager I can't see the databases, a message error
"Arithmetic overflow error for data type smallint, value = 46080" appears,
but the server is seems to be still working, what it is?
Regards,
Jess R.
Hi
You may want to run SQL profiler to see what is being run by Enterprise
manager.
It could be similar (but not necessarily the same thing as!) to
http://support.microsoft.com/default...b;en-us;234028
Also check the version of SQL Server http://www.aspfaq.com/show.asp?id=2160.
John
"Jesus Brito" wrote:

> Hello friends, in this moments I have a problem with my Ms Sql server 2000,
> at the enterprise manager I can't see the databases, a message error
> "Arithmetic overflow error for data type smallint, value = 46080" appears,
> but the server is seems to be still working, what it is?
> Regards,
> Jesús R.
>
>

Arithmetic overflow error for data type smallint, value = 46080

Hello friends, in this moments I have a problem with my Ms Sql server 2000,
at the enterprise manager I can't see the databases, a message error
"Arithmetic overflow error for data type smallint, value = 46080" appears,
but the server is seems to be still working, what it is?
Regards,
Jess R.Hi
You may want to run SQL profiler to see what is being run by Enterprise
manager.
It could be similar (but not necessarily the same thing as!) to
http://support.microsoft.com/defaul...kb;en-us;234028
Also check the version of SQL Server http://www.aspfaq.com/show.asp?id=2160.
John
"Jesus Brito" wrote:

> Hello friends, in this moments I have a problem with my Ms Sql server 2000
,
> at the enterprise manager I can't see the databases, a message error
> "Arithmetic overflow error for data type smallint, value = 46080" appears,
> but the server is seems to be still working, what it is?
> Regards,
> Jesús R.
>
>

Arithmetic overflow error for data type smallint, value = 46080

Hello friends, in this moments I have a problem with my Ms Sql server 2000,
at the enterprise manager I can't see the databases, a message error
"Arithmetic overflow error for data type smallint, value = 46080" appears,
but the server is seems to be still working, what it is?
Regards,
Jesús R.Hi
You may want to run SQL profiler to see what is being run by Enterprise
manager.
It could be similar (but not necessarily the same thing as!) to
http://support.microsoft.com/default.aspx?scid=kb;en-us;234028
Also check the version of SQL Server http://www.aspfaq.com/show.asp?id=2160.
John
"Jesus Brito" wrote:
> Hello friends, in this moments I have a problem with my Ms Sql server 2000,
> at the enterprise manager I can't see the databases, a message error
> "Arithmetic overflow error for data type smallint, value = 46080" appears,
> but the server is seems to be still working, what it is?
> Regards,
> Jesús R.
>
>

Arithmetic overflow error converting expression to data type int.

I've got this error message while generate the output with ASP:

"Microsoft OLE DB Provider for SQL Server (0x80004005)
Arithmetic overflow error converting expression to data type int."

it indicate that the error is related to this line:
"rc1.Movenext"

where rc1 is set as objconn.Execute(sql).

Not all outputs result like this, it happens when it has many relationships with other records, especially with those records which also have many relationships with other records.

Can anyone suggest a solution?
I've tried to increase the size of the database file, but it doesn't work.could you perhaps show the query that caused the error?|||Here is the query:

CREATE procedure rp_co_relatedcompanies @.companyregistrationno varchar(20)
as
set nocount on
--used for related companies details

select a.companypersonid,a.personname,a.personaddress1,a. personaddress2,a.personcity,a.personstate,a.person country,
a.personzip,a.personphone,a.personfax,a.personemai l,a.personuniqueid,b.principalbusiness,b.secondryb usiness,
c.relationwithcompany,c.numberofshares, c.classofsharesheld , cast(d.noofissuedshares as int) 'noofissuedshares',
'percentageofsharehold' = case when c.numberofshares =0 then 0 else c.numberofshares/d.noofissuedshares*100 end, c.otherremarks
from companyperson a
left join companystructure d on a.personuniqueid=d.companyregistrationno
left outer join operationsandactivity b on a.personuniqueid = b.companyregistrationno
left outer join relationshipcompanyperson c on a.companypersonid = c.companypersonid
where c.companyregistrationno = @.companyregistrationno and c.relationshipwith = 2
and a.deletionflag=0 order by a.personname
set nocount off
GO|||can you see anything in that query where there might be a problem "converting expression to data type int"

the immediate suspect is cast(d.noofissuedshares as int)

another suspect is c.numberofshares/d.noofissuedshares*100

check those and let us know|||Table DDL would help a lot. Heck, I was betting on the c.companyregistrationno being an INT and the @.companyregistrationno failing the implicit Cast...

Anybody want to start a pool on this? Or another option (not as much fun, but the problem would get solved a lot faster) would be for yllas to post the DDL for all of the tables in this query!

-PatP

Arithmetic overflow error converting expression to data type datetime.

Ya ? am taking this error message in Asp.Net and i am not inserting a new row my database.

i have a databese and my fields

EmailID-->int

EmailAdress-->varchar(100)

DateTime-->datetime

IPAdress-->char(15)

Please help me,thanks

Most likely a disparity between the application date format and the date format SQL Server 'expects'. (Application passing the date parameter in the form of dd/mm/yyyy, and SQL Server accepting that as mm/dd/yyyy -and the ensuing date is invalid.

Have the application pass the date parameter in the ISO form of: yyyy/mm/dd OR yyyymmdd.

Arithmetic overflow error

Hi,

After 6 months running with the datatype decimal(15,2), every time that I want to update a row, the following message is displayed,

Microsoft SQL Server:8115[Microsoft][ODBC SQL Server Driver][SQL
Server]Arithmetic overflow error converting float to data type
numeric

and the decimal data is shift to left, like this sample:

41.61 >> 4161.00
62.30 >> 623.00

Anyone can help?

tksHave you run a dbcc check on the table/database?

Try doing a compare
select * from tbl where fld = 62.3 to find if it is a presentation or data problem (probably it is the data)

What happens if you do
select convert(decimal(15,2),62.3)

Monday, February 13, 2012

ARITHABORT

Help!!!
When attempting an insert to a table in SQL I get a message indicating that
the ARITHABORT setting is incorrect. Running (select databasepropertyex db,
'isarithabortenabled') returns null.
Running (alter database 'db' set arithabort off) doesn't change the setting.
I've tried setting it on and off, but the check always returns NULL.
Isn't there someway to set this value to 0 directly?
If anyone can help me I'd truly appreciate it. The table affected is the
primary table in the database and therefore, my db system is DOWN and
inoperable!!
Thanks.
Ross
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.592 / Virus Database: 375 - Release Date: 2/18/2004Try:
SELECT DATABASEPROPERTYEX('MyDatabase', 'IsArithmeticAbortEnabled')
Note that ARITHABORT must be *ON* when updating a table with an indexed view
or index on computed column.
Hope this helps.
Dan Guzman
SQL Server MVP
"Ross Culver" <rculver@.alliant-solutions.com> wrote in message
news:Ox%235GRW$DHA.3804@.TK2MSFTNGP09.phx.gbl...
> Help!!!
> When attempting an insert to a table in SQL I get a message indicating
that
> the ARITHABORT setting is incorrect. Running (select databasepropertyex
db,
> 'isarithabortenabled') returns null.
> Running (alter database 'db' set arithabort off) doesn't change the
setting.
> I've tried setting it on and off, but the check always returns NULL.
> Isn't there someway to set this value to 0 directly?
> If anyone can help me I'd truly appreciate it. The table affected is the
> primary table in the database and therefore, my db system is DOWN and
> inoperable!!
> Thanks.
> Ross
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.592 / Virus Database: 375 - Release Date: 2/18/2004
>

ARITHABORT

Help!!!
When attempting an insert to a table in SQL I get a message indicating that
the ARITHABORT setting is incorrect. Running (select databasepropertyex db,
'isarithabortenabled') returns null.
Running (alter database 'db' set arithabort off) doesn't change the setting.
I've tried setting it on and off, but the check always returns NULL.
Isn't there someway to set this value to 0 directly?
If anyone can help me I'd truly appreciate it. The table affected is the
primary table in the database and therefore, my db system is DOWN and
inoperable!!
Thanks.
Ross
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.592 / Virus Database: 375 - Release Date: 2/18/2004Try:
SELECT DATABASEPROPERTYEX('MyDatabase', 'IsArithmeticAbortEnabled')
Note that ARITHABORT must be *ON* when updating a table with an indexed view
or index on computed column.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Ross Culver" <rculver@.alliant-solutions.com> wrote in message
news:Ox%235GRW$DHA.3804@.TK2MSFTNGP09.phx.gbl...
> Help!!!
> When attempting an insert to a table in SQL I get a message indicating
that
> the ARITHABORT setting is incorrect. Running (select databasepropertyex
db,
> 'isarithabortenabled') returns null.
> Running (alter database 'db' set arithabort off) doesn't change the
setting.
> I've tried setting it on and off, but the check always returns NULL.
> Isn't there someway to set this value to 0 directly?
> If anyone can help me I'd truly appreciate it. The table affected is the
> primary table in the database and therefore, my db system is DOWN and
> inoperable!!
> Thanks.
> Ross
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.592 / Virus Database: 375 - Release Date: 2/18/2004
>