* Strange SQL Server Connection Error *

Oct 10, 2005

Hi guys,

We've been experiencing this strange error from our SQL server for about a month now and i've tried alot of things, visited alot of websites and manufactured a few possible solutions but nothing helps! Its very frustrating.
This is the error i get when i try and expand the server tree:

A connection could not be established to [OurServerName]

Reason: SQL Server does not exist or access denied.

ConnectionOpen (Connect())..

Please verify SQL Server is running and check your SQL Server registration properties by clicking on [OurServerName] node) and try again.

What really gets to me is that everything works after i restart the server. Then things will go fine for about a day or two and then the same thing again. This i causing alot of downtime for us. Can anyone please just give me a suggestion? :confused:

View 3 Replies


ADVERTISEMENT

Help. When Using Profile GetPropertyValue, I Get The Following Connection 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 Sett

May 3, 2008

 Hi,I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property((string)(this.GetPropertyValue("Address1")));When I look at the stack, it is coming from my ProfileWrapper class which adds user address, city, etc.. from a class which inherits fromSystem.Web.Profile.ProfileBase. From the stack, it is calling the System.Web.Profile and crashed when it tries to open a connection atSystem.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject). I already migrated all aspnet_user, aspnet_roles, etc.. and don't get any connection errors. It is only when I try to get the profile data. This works on  my pc, but throws an error on my lunarpage website.Any help is greatly appreciated.Thanks,AJAn 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)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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)Source Error:Line 100:    public virtual string Address2 {Line 101:        get {Line 102:            return ((string)(this.GetPropertyValue("Address2")));Line 103:        }Line 104:        set {Source File: c:windowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot021d50639a6858cApp_Code.54nvluyo.1.cs    Line: 102Stack 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +435   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.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197   System.Web.Profile.SqlProfileProvider.GetPropertyValuesFromDatabase(String userName, SettingsPropertyValueCollection svc) +782   System.Web.Profile.SqlProfileProvider.GetPropertyValues(SettingsContext sc, SettingsPropertyCollection properties) +428   System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider) +404   System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName) +117   System.Configuration.SettingsBase.get_Item(String propertyName) +89   System.Web.Profile.ProfileBase.GetInternal(String propertyName) +36   System.Web.Profile.ProfileBase.get_Item(String propertyName) +68   System.Web.Profile.ProfileBase.GetPropertyValue(String propertyName) +4   ProfileCommon.get_Address2() in c:windowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot021d50639a6858cApp_Code.54nvluyo.1.cs:102   ProfileWrapper..ctor() in d:inetpubvhostsjavcentral.comhttpdocsApp_CodeProfileWrapper.cs:242   ProfileDataSource.GetData() in d:inetpubvhostsjavcentral.comhttpdocsApp_CodeProfileDataSource.cs:17[TargetInvocationException: Exception has been thrown by the target of an invocation.]   System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0   System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +308   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29   System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +480   System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1960   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70   System.Web.UI.WebControls.FormView.DataBind() +4   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82   System.Web.UI.WebControls.FormView.EnsureDataBound() +163   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69   System.Web.UI.Control.EnsureChildControls() +87   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +21   System.Web.UI.Control.FindControl(String id) +9   CustomerDetailsEdit.OnPreRender(EventArgs e) in d:inetpubvhostsjavcentral.comhttpdocsUserControlsCustomerDetailsEdit.ascx.cs:60   System.Web.UI.Control.PreRenderRecursiveInternal() +86   System.Web.UI.Control.PreRenderRecursiveInternal() +170   System.Web.UI.Control.PreRenderRecursiveInternal() +170   System.Web.UI.Control.PreRenderRecursiveInternal() +170   System.Web.UI.Control.PreRenderRecursiveInternal() +170   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041 

View 1 Replies View Related

Strange Error In Sql Server?

Apr 13, 2007

i m using sql server 2000. My problem is tht no matter what date i enter, sql server always displays it as
1900-1-1. This is happening on all columns which have been specified as datetime. Whts the problem & the solution to the problem?

View 3 Replies View Related

Strange SQL-server Error

Feb 13, 2008

I get this SQL-sever error in my application. I guess it has something to do with the declaration of namespaces? Does anyone know for sure? Thanks in advance!

The type 'System.Data.Selclient.SqlConnection' exists in both
'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727System.Data.dll' and 'crogramMicrosoft Visual
Studio 8Common7IDEPublicAssembliesSystem.Data.SqlClient.dll'

View 11 Replies View Related

Very Strange Sql Server Error

Aug 19, 2007

I have a script that creates a database and sets up everything required for merge replication. Merge replication is pull with a single parameterized row filter based on HOST_NAME() and joins on other tables. It works perfectly.
I recently decided to drop all my identity columns and use rowguid's instead.

I modified my script by only changing the primary key column definitions, basicaly I went from "[Id] [int] NOT FOR REPLICATION IDENTITY (1,1) NOT NULL PRIMARY KEY CLUSTERED" to "[Id] [uniqueidentifier] ROWGUIDCOL NOT NULL DEFAULT NEWSEQUENTIALID() PRIMARY KEY CLUSTERED".

The script still works fine. Everything is executed succesfully and even the snapshot agent finishes it's job.

But the problem is, that when I want to create a partition I get the following error:


A value for the parameter @host_name was specified, but no articles in the publication use HOST_NAME() for parameterized filtering. (.Net SqlClient Data Provider). Microsoft Sql Server, Error: 20672

If I try to synchronize a subscription then the subscription is created succesfully, but I get an error while synchronizing stating:
Merge agent was unable to determine if another subscription exists for the current partition.

And yes, I do have my filters set up 100% correctly.

The funny thing is, if I create the publication via Management Studio, then I don't get that error.
But if I create the publication via Management Studio, immediately afterwards generate the script for it, delete the publication and create the publication from the generated script, I get the error again


From this I have concluded that no way can the problem be in my new script...
Everything is dandy fine with the server as well, because the original scipt still works flawleslly.

Does anyone have any ideas what I could try to get things working?
Has anyone even gotten merge replication set up via script, while database -> uses only rowguids, hostname parameterized filter and joins?
Or should I just report this as a bug to Microsoft and go back to my original script, including the identity hell?

PS! I'm using Windows Server 2003 Standard x86 SP2, SQL Server 2005 Standard x86 SP2

View 7 Replies View Related

Sql Server Lockup After Strange Error In Log, Help Please.

May 31, 2006

Can anyone help me solve why my server is locking up.

We're running sql server 2005 ent on a 2 cpu dual core server. With 3gig. Once each the last couple weeks, the machine has hung and the only thing I can find that's suspicious is on the sql server log.  It's below.  After the excerpt is about 50 more different memory errors.  As far as I know there's no ssl configured for log in, it mostly uses private lan cards for security between it and the web/application server.

05/31/2006 14:39:48,spid2s,Unknown,MEMORYCLERK_SQLQUERYEXEC (Total) <nl/> VM Reserved = 0 KB <nl/> VM Committed = 0 KB <nl/> AWE Allocated = 0 KB <nl/> SM Reserved = 0 KB <nl/> SM Committed = 0 KB<nl/> SinglePage Allocator = 1000 KB<nl/> MultiPage Allocator = 312 KB
05/31/2006 14:39:48,spid2s,Unknown,MEMORYCLERK_SQLBUFFERPOOL (Total) <nl/> VM Reserved = 4214784 KB <nl/> VM Committed = 4198400 KB <nl/> AWE Allocated = 0 KB <nl/> SM Reserved = 0 KB <nl/> SM Committed = 0 KB<nl/> SinglePage Allocator = 0 KB<nl/> MultiPage Allocator = 40 KB
05/31/2006 14:39:48,spid2s,Unknown,MEMORYCLERK_SQLGENERAL (Total) <nl/> VM Reserved = 0 KB <nl/> VM Committed = 0 KB <nl/> AWE Allocated = 0 KB <nl/> SM Reserved = 0 KB <nl/> SM Committed = 0 KB<nl/> SinglePage Allocator = 30408 KB<nl/> MultiPage Allocator = 4528 KB
05/31/2006 14:39:48,spid2s,Unknown,Memory node Id = 0 <nl/> VM Reserved = 4261240 KB <nl/> VM Committed = 4244224 KB <nl/> AWE Allocated = 0 KB <nl/> SinglePage Allocator = 2403592 KB<nl/> MultiPage Allocator = 27392 KB
05/31/2006 14:39:48,spid2s,Unknown,Memory Manager <nl/> VM Reserved = 4266872 KB<nl/> VM Committed = 4249768 KB <nl/> AWE Allocated = 0 KB <nl/> Reserved Memory = 1024 KB <nl/> Reserved Memory In Use = 0 KB
05/31/2006 14:39:48,spid2s,Unknown,LazyWriter: warning<c/> no free buffers found.
05/31/2006 14:34:30,Logon,Unknown,The server was unable to load the SSL provider library needed to log in; the connection has been closed. SSL is used to encrypt either the login sequence or all communications<c/> depending on how the administrator has configured the server. See Books Online for information on this error message:  0x2746. [CLIENT: 10.10.10.207]
05/31/2006 14:34:30,Logon,Unknown,Error: 17194<c/> Severity: 16<c/> State: 1.
05/31/2006 14:03:05,Backup,Unknown,Database differential changes were backed up. Database: PRIOS_New<c/> creation date(time): 2006/03/02(07:41:21)<c/> pages dumped: 156468<c/> first LSN: 2317:48292:175<c/> last LSN: 2317:49978:1<c/> full backup LSN: 2315:126242:184<c/> number of dump devices: 1<c/> device information: (FILE=1<c/> TYPE=DISK: {'D:DiffBackupPRIOS_New_backup_200605311400.bak'}). This is an informational message. No user action is required.

 

Thank you,

Gary Jutras

View 25 Replies View Related

SQL Server Error '80040e31' Timeout Expired Strange.

Oct 30, 2007



Hi All,

we are working on a web application created in ASP & SQL 2000 environment.
In the code , we have a single connectionstring to connect database.
The application was running fine for the past 3 years, but all of a sudden we are getting "timeout expired" error only in someparts of the application but not on all database access.
The code which raises this error is a bit large which need to look into table of 8k recs with more conditions.
The same sql query took 1:01 minutes to execute in query qnqlyser.
I changes the script timeout to 900secs,
I herd we need to upgrade MDAC or we need to change connection timeout or we need to cahnge the code.

we cannot change the query, it is the most possible way we could get that.

Can somebody help me with the possible solution.


Thanks & Regards,
Sai. K.K

View 5 Replies View Related

Strange Error On Linked Server - Cannot Open Default Database

Apr 16, 2007

Hi,We have 2 servers. Server1 is a 2000 box, with SP3 (yes I know it isnot up to date). Server2 is a 2005 box, SP2.I set up Server1 (2000) to have a linked server to Server2 (2005). Thereason I did this is because we are using a stored procedure onServer2 to send mail, as we have found that using mail on 2000 doesn'talways work as advertised.When I set up the linked server on the 2000 box, for security I justset it up to use a SQL Server user on the 2005 box. The SQL Serveruser on the 2005 box has permissions to run the stored procedure forsending mail.Here's the weird thing though. When calling the stored procedure onthe 2005 box from the 2000 box, sometimes we get an error that "Thedefault database cannot be opened", and the query does not run on the2005 box. However, it only happens *sometimes*. Other times, the queryruns fine.Since the problem seeemed to be with the default database, I changedthe SQL Server user on 2005 default database to the SAME database thatcontains the stored procedure.However, I just don't understand why it's even TRYING to open thedefault database, since when we called the linked server we are doingso as, and it's referencing the default database in the name:EXEC Server2.DefaultDatabase.dbo.StoredProcedureNameHowever, after changing the user's default database to"DefaultDatabase" as shown above, the query runs fine.Why are we having this problem? That is, if I change the defaultdatabase to something other than "DefaultDatabase", then the querydoesn't run, even though the database name is referenced in the abovequery??Obviously, this is not desireable, because that means we can only runqueries that are in "DefaultDatabase", which may not always be thecase.Thanks much

View 2 Replies View Related

Very Strange Connection Time Out

May 25, 2004

I am sure I am using the same connection string for all connection.open, and closing all connections as soon as possible… but

When I try to debug my web app with vs, it runs for some time then I get:

The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached exception

However, if I just access the application normally form the url (not using vs.net) it runs flawlessly.

Has some one had the same problem? i can't debug help!!

View 3 Replies View Related

Strange Remote Connection Problem

Feb 16, 2007

Vendor app (written in VB '05) connects fine building screens that list data from only one record but blows up building 'list' screens that list multiple records. Really strange-it works fine when run locally on the server (Win2K3) and when run from one developer's machine (which has VS 2005 but not SQLExpress) but not from other developer's machines (which have both VS 2005 & SQLExpress) nor from a 'user' machine (which has neither). All have .Net Frameworks 2.0, the developer machines have SQL Management Studio & connect fine via that.

Vendor, of course, says it's a configuration issue so not their problem. I'm trying to figure out what they could be doing differently when building a list screen & therefore why it would fail. Fact that it works locally suggests that the failure is in the remote connection-but fact that it connects on 'single record' screens says that remote connections work. So what would be different about a request to return multiple records and why would it work locally but not remotely?

BTW, Surface Area Configuration Manager won't run-it reports 'localhost does not exist on the network or it cannot be configured remotely'. This is when running the Configuration tool directly on the server.

Any ideas?

View 2 Replies View Related

Strange Table Connection Problem

Nov 29, 2005

Hi
I've got a database in SQL Server 2000 on Windows Server 2003 which appears to be okay from SQL Enterprise Manager and from SQL Query Analyser but which has a problem with one particular table when connected to from a VB DLL using ADO. The queries do either a select or an insert - the latter is via a stored procedure. Once the failure happens, any other queries generate a -2147217871[Microsoft][ODBC SQL Server Driver]Timeout expired.
If I delete the table and recreate it all is well. If I run an integrity check nothing shows up. I've tried deleting the indexes and that made no difference either. SQL Server is patched up to SP4 and ADO is from the MDAC 2.8. VB is version 6 Enterprise with SP6. None of the other databases in the instance exhibit the problem and they're all structured in an identical way. The table is quite large but we've got much larger one's using the same procedures and they don't have a problem. Also, if I restore a backup of the problem database onto another machine the problem shows on the other machine too.

Any ideas anyone?

View 2 Replies View Related

Very Strange Behavior Of SQLServer With Connection From CGI

Jul 23, 2005

Hello,I developed a win32 .exe CGI that connects to a clustered SQLServer toreport some data.The software is written with Borland C++Builder.This is the oledb string:Name=Provider=SQLOLEDB;Password=xxx;Persist Security Info=True;UserID=xxxx;Data Source=xxxxx;Initial Catalog=xxxxx;NetworkLibrary=dbmssocnIt suddendly stopped working on my customer network, so I made sometest and I verivied that the problem is on the connection withSQLServer: my test program just opens a connection, closes it andexits, reporting in a log file if the open was successful or failed.If I run the program locally, just launching it, no problem, it works.I can run it mutilple time continuosly and is connects every time.If I run the program through my webserver, as a CGI that's how it issupposed to work (http:\localhostscriptsconnect.exe), it connectsthe first time, and then I have to wait 40 seconds to connect againsuccessfully, or it fails.If I try against MY sqlserver on my laptop or on my network no 40 secproblems, but on my customer network, with THEIR SQLServer , if I tryto connect from their webserver, or from my laptop webserver, I havethis 40sec problem.I analyzed the network traffic, and I discovered that when I run mytest program locally it originates only TCP/IP packets, and SQLServeranswers only with TCP/IP.But when I use it from the webserver as a CGI, it originates an UDPpacket, then SQL answers with another UDP packet, and then theycommunicate over TCP/IP.This when it works: the second time my program continues to send theUDP packet, but it receives no answer, and fails the communication.I can only say that:- we haven't touched the program for months, and it really stoppedworking suddendly, so I suspect that something in my customer netowrkhas changed- I tried many different OLEDB strings, disabling connection poolingand all the services, calling the SQLServer by name or IP...- the problem can't be related to my program, because now is reallyjust an oledb connection testAnyone have an idea?Thank you very much,Mattia

View 1 Replies View Related

Very Strange Remote Connection Issues

Feb 28, 2008

Well this has got most of us stracthing our head as not matter what we do we can't connect remotely

But it get's a bit more complex. We have an existing web application running with a local instance of express running fine. However as the server is getting hammered we need to put the new version of the site on a second server. Unfortunately the key contact who use to work on the old system and set it up is no longer avialable. We've been through all the basics and nothing works... our latest attempt was to install a new instance of 2005 as we were not sure what was going on.

So, here is the log for this new clean instance:





Code Snippet

2008-02-28 15:12:13.75 spid5s Server name is 'S15271584SQLEXPRESS'. This is an informational message only. No user action is required.
2008-02-28 15:12:13.75 spid5s Starting up database 'msdb'.
2008-02-28 15:12:14.00 spid8s Clearing tempdb database.
2008-02-28 15:12:14.26 Server A self-generated certificate was successfully loaded for encryption.
2008-02-28 15:12:14.29 Server Server is listening on [ 'any' <ipv4> 4286].
2008-02-28 15:12:14.29 Server Server local connection provider is ready to accept connection on [ \.pipeSQLLocalSQLEXPRESS ].
2008-02-28 15:12:14.29 Server Server named pipe provider is ready to accept connection on [ \.pipeMSSQL$SQLEXPRESSsqlquery ].

The Browser is up and running and we try to connect via SQL Management Studio with the following details:

SERVERNAMESQLExpress
SQL Server Authentication

But get:





Code Snippet

TITLE: Connect to Server
------------------------------

Cannot connect to SERVERNAMESQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: -1)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


How do I know this is not a connectivity/firewall issue? Simple:

1. We stop the SQLExpress instance
2. Setup netcat to listen on that port (nc -l -p 4286)
3. Connect via telnet (telnet SERVERNAME 4286) and type something which then appears printed out on the other end.

Anyway, the Windows Firewall is off and I can't see any other firewalls installed (we did not setup this server).

Btw, if we try and connect to the existing instance we get:





Code Snippet

TITLE: Connect to Server
------------------------------

Cannot connect to www.a-t-s.net.

------------------------------
ADDITIONAL INFORMATION:

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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Here is the error log for that instance:






Code Snippet

2008-02-15 06:43:16.92 spid4s Server name is 'SERVERNAMES15271584'. This is an informational message only. No user action is required.
2008-02-15 06:43:16.92 spid4s Starting up database 'msdb'.
2008-02-15 06:43:17.14 spid8s Clearing tempdb database.
2008-02-15 06:43:17.19 Server A self-generated certificate was successfully loaded for encryption.
2008-02-15 06:43:17.20 Server Server is listening on [ 'any' <ipv4> 1177].
2008-02-15 06:43:17.20 Server Server is listening on [ 'any' <ipv4> 1433].
2008-02-15 06:43:17.31 Server Server local connection provider is ready to accept connection on [ \.pipeSQLLocalS15271584 ].
2008-02-15 06:43:17.31 Server Server named pipe provider is ready to accept connection on [ \.pipeMSSQL$S15271584sqlquery ].
2008-02-15 06:43:17.31 Server Dedicated administrator connection support was not started because it is not available on this edition of SQL Server. This is an informational message only. No user action is required.
2008-02-15 06:43:17.33 Server The SQL Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
2008-02-15 06:43:17.33 Server SQL Server is now ready for client connections. This is an informational message; no user action is required.


We've also run a network sniff with wireshark and get see the request hitting SQL on the right port... but there is never a response back.

Any ideas? I'm open to anything short of slitting my wrists!!


Many thanks in advanced.

View 5 Replies View Related

Error While Establishing A Connection To The SQL Server 2005 - Could Not Open A Connection To SQL Server

Apr 12, 2007

Hi, I had an old web application created during asp.net 1.1 and it have a connection problem with the sql server 2005 when it is mirgrated to a new webserver with dotnet framework 2.0 platform. I have enabled the remote access(TCP/IP and named pipes) in sql server 2005, did all the neccessary things, check whether the TCP/IP is enabled, named pipe is enabled...  I created another web application using VS 2005. The database connection works perfectly well.This are the connectionString from the old web application.<appSettings>    <add key="ConnectionString" value="Server=127.0.0.1;Database=somedb;User id=user; Password=somepassword; Trusted_Connection=False; POOLING=FALSE"/></appSettings>  Thankyou in advance! 

View 4 Replies View Related

Rounding Error: Between Flat File Connection Manager Source &&amp; OLE DB Connection Destination (SQL Server 2005)

Jun 22, 2006

I have a Rounding error: Between flat file connection manager Source & OLE DB Connection Destination (SQL Server 2005) in my Dataflow.

File looks like this lets call column names Col A,B,C,D

70410000 RD1 1223631.92 196042.42
70329000 ICD 11025.84 3353.88
71167300 COL 104270.59 24676.96

flat file connection manager settings: first row Column names then Advanced tab Col A float , Col B float , Col C string ,Col D float ,

OLE DB Connection Destination (SQL Server 2005)

CREATE TABLE [dbo].[PT_CUST_ABR](

[PARTY_NO] [float] NULL,

[PARTY_NAME] [varchar](75) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

[TELECOMABR] [float] NULL,

[GENIABR] [float] NULL,



Problem: ColA (Source) Rounding error to PARTY_NO (Destination)
I have a field of text of in a flat file that the flat file connection manager Source picks up correctly €ś70000893€?
However when it gets the OLE DB Connection Destination the data has changed to 70000896. That€™s before its even Written to the database.
The only clue that something is wrong in the middle is the great Data viewer shows the number as 7.000009E+07
Other clues looking at the data it appears there is a rounding error on only the number that dont end in 00
ColA (Source) PARTY_NO (Destination)
71167300 71167296
70329000 70329000
70410000 70410000
Any ideas people?
Thanks in advance
Dave



View 3 Replies View Related

SQl Server Error: ----&> Named Pipes Provider, Error: 40 - Could Not Open A Connection To SQL Server

Apr 23, 2008

 
Hi Friends,
Im using .Net2008 and MS SQL Server2005, I Have a web application , i want to connect to the server machine SQL Server,  When i run the application im getting the following error.
Im trying to connect to the database from local machine application to server machine database
  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)
My WebConfig File is<connectionStrings>
<add name="NewConnectionString" connectionString="Data Source=sqlserverservername.com;Initial Catalog=Test;UID=User;PASSWORD=Pwd;Integrated Security=True;connect timeout=30" providerName="System.Data.SqlClient"/></connectionStrings>
 
<appSettings>
<add key="connectionstring" value="Data Source=Sys67;Initial catalog=DB;user id=sa;password=sa;connect timeout=30"/>
</appSettings>
Please Help me to sortout this ISSUe, Its very urgent please 
 
 

View 7 Replies View Related

Error :(provider: Named Pipes Provider, Error: 40 - Could Not Open A Connection To SQL Server) (Microsoft SQL Server, Error: 53)

Mar 1, 2007

Hi,

I am trying to connect to my SQL Server 2005 but it gave me following error message.




TITLE: Connect to Server
------------------------------

------------------------------
ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: 53)



So, Please help me to solve this problem.



tnks.

View 20 Replies View Related

Error: 26 - Error Locating Server/Instance Specified - (My Hosting Company Says It's In My Connection String) NOT!

May 24, 2007

Hi All...



I am trying to move my site (incomplete) for testing and I am finding that the Db connection process to be

the most difficult, well back to my problem. I can't seem to get past this error and am frustrated with overall

connectivity problems. Please help!!!



===================================================================================


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)

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735123
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) +130
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.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
System.Web.UI.WebControls.Login.AttemptLogin() +105
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
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) +5102





Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210





Now you all must admit that, if your somewhat new to this databasing, It's a ***.



The source for my application is Visual Web Designer 2005 Express

It is an ASP.Net driven site with membership roles and all the good stuff.

the latest theory is that I need to change the provider config in the web.config file from AspNetSqlProvider

to something else. Most of my complications and frustrations come from GoDaddy and no access to the

shared server (understandibly).



I hope I gave enough info for help and not too much..



Dave



View 4 Replies View Related

Test Connection Failed Because Of Error Initializing Provider. The HTTP Server Returned The Following Error : Not Found

May 26, 2008



Hi All,

I am using windows 2003 server and i have installed SSAS 2005 and configured http request for AS 2005 with this below url : http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx. I had tried all the possiblities given in this url. But i am getting like "Test connection failed because of error initializing provider. The HTTP Server returned the following error : Not found" when i create udl file. Moreover i have installed MSOLAP 3.0 and OLAP 9.0 provider and MSXML 6.0 Parser.

Can you anyone please provide solution for this?

Thanks in advance,
Anand Rajagopal

View 1 Replies View Related

Strange Error

Aug 3, 2006

I am using c# and ASP.NET 2 and I am getting a very strange error. I
have a field called CompanyID in SQL Server 2005, and it allows null
values in it. When this CompanyID is not NULL, ie for example it is
202, then when i press the update button it allows me to update
perfectly in the database. However if the CompanyID is NULL,
and I try to update the companyID, to lets say 202, the application
just crashes with the following message:- System.InvalidCastException: Object cannot be cast from DBNull to other types. I tried to set some breakpoints in the application to debug, however it does not even pass through these breakpoints! Any ideas on what the problem can be or how I can debug? Thanks for your help and time Johann

View 6 Replies View Related

A Strange Error Here...

May 13, 2008

So we currently are running a SQL 7 Server, which hopefully we will be updating this year but untill then we're stuck.  I've got a web app using ASP.NET 2.0 and on occasion I get this 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: TCP Provider, error: 0 - Only one usage of each socket address (protocol/network address/port) is normally permitted.) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at 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) 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()

View 2 Replies View Related

Very Strange Error Can Anyone Help With .

Mar 25, 2004

I Some sql that it keeps throwing the following error

SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

Here is the sql

UPDATE dbo.temptable
SET code = 'MM'
FROM dbo.temptable T
JOIN dbo.Item I WITH (NOLOCK)
ON T.ProductID = P.ProductID
JOIN dbo.cars C WITH (NOLOCK) ON I.ModelID = C.ModelID
JOIN dbo.carmakes CM WITH (NOLOCK) ON CM.MakeID = C.MakeID
JOIN dbo.CarDealerMakes CDM WITH (NOLOCK)
ON CM.MakeID = CDM.MakeID
WHERE T.ProductID NOT IN (

SELECT distinct A.ProductID
FROM dbo.Action A WITH (NOLOCK)
JOIN dbo.ActionPurchases AP WITH (NOLOCK)
ON A.ActionID = AP.ActionID
WHERE A.CustomerID = 2

UNION

SELECT distinct A.ProductID
FROM dbo.Action A WITH (NOLOCK)
JOIN dbo.ActionServices S WITH (NOLOCK)
ON A.ActionID = S.ActionID
WHERE 2 = A.ProductID)

That sql will run on windows 2000 but it will not run on windows 2003.
I have the latest service pack.

Has anyone ever come across this before or have and suggestions ?

View 2 Replies View Related

Strange Error

Nov 19, 2006

Hello
I have one PC with SQL server 2000 and I am working on one database called TaxReg but today I found it gray and (suspect) beside it
could you please tell what is the problem and how to fix it ?

View 1 Replies View Related

Strange Error

May 19, 2008

SELECT TOP 9 id,vehicleref,capid,manufacturer,model,derivative,ch,'3' as term,'10000' as mileage,'orderby' as orderby,cvehicle_shortmodtext,source,studioimages FROM vwAllMatrixWithLombardAndShortModel
WHERE locatcode =1
GROUP BY id,vehicleref,capid,manufacturer,model,derivative,ch,term,mileage,orderby,cvehicle_shortmodtext,source,studioimages

Msg 207, Level 16, State 1, Line 2
Invalid column name 'mileage'.
Msg 207, Level 16, State 1, Line 2
Invalid column name 'orderby'.

Can anyone help?

Thanks

View 2 Replies View Related

Some Strange Error

Aug 3, 2006

Hi,

In my package I am executing 8 'Execute package' tasks which calls 8 different packages. All these tasks are indepent so they are not connected to each other. In each package I have defined a variable at the start of each package there is a script task to assign the 'StartTime' system variable value to the user defined variable.

If I run the tasks individually, it is running without any problem. When I am running all the tasks in the parent package, very often the package fails and each time different different tasks are failing. But the error happens at the script task which is used to define the start time. The error message is 'Error: The script threw an exception: Object reference not set to an instance of an object.'. But inside the script task, I have only one statement which assigns the system start time value to the user variable. Also, in my log file, I am getting 2 entries for all the tasks in that failing child package, but I have not specified any looping in my parent package. One more peculiar thing is even though as per the log entry it ran twice, no single record is inserted/updated(????).

Anybody have any idea of this problem?

Thanks.

View 1 Replies View Related

Strange Error

Apr 25, 2006

I am getting the following error when I try to debug a package that needs to Copy Columns from an AS400 database into SQL 2005:

[SQL Server Destination [1684]] Error: An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Could not bulk load because SSIS file mapping object 'GlobalDTSQLIMPORT ' could not be opened. Operating system error code 2(The system cannot find the file specified.). Make sure you are accessing a local server via Windows security.".

Has anybody seen this error and what do I need to do and check for?

Thanks for the information.

View 6 Replies View Related

Strange SQL Error...

Oct 2, 2007



I am getting this error on an almost daily basis. Using SQL 2005 fully patched.

I searched the web and couldn't fin anthing about it. has anyone here seen this problem before...

Disk space is fine btw... 35GB free


Message
An error occurred while writing an audit trace. SQL Server is shutting down. Check and correct error conditions such as insufficient disk space, and then restart SQL Server. If the problem persists, disable auditing by starting the server at the command prompt with the "-f" switch, and using SP_CONFIGURE.


View 10 Replies View Related

Strange SQL CLR Error

Oct 30, 2006

Hello,

I am running the code below that simply adds a row with two values to a Table. When it is run, it gives me the following error:

A .NET Framework error occurred during execution of user defined routine or aggregate 'InsertCurrency':

System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_Sales.Currency'. Cannot insert duplicate key in object 'dbo.SalesCurrency'.

This seems to indicate I am adding a duplicate key, however I have confirmed several times that I am not adding a duplicate key.

Here is the code. Thanks for any suggestions about why this error is occuring.

<SqlProcedure()> _

Public Shared Sub InsertCurrency(ByVal currencyCode As SqlString, ByVal name As SqlString)

Using conn As New SqlConnection("context connection=true")

Dim InsertCurrencyCommand As New SqlCommand()

Dim currencyCodeParam As New SqlParameter("@CurrencyCode", SqlDbType.NVarChar)

Dim nameParam As New SqlParameter("@Name", SqlDbType.NVarChar)

currencyCodeParam.Value = currencyCode

nameParam.Value = name

InsertCurrencyCommand.Parameters.Add(currencyCodeParam)

InsertCurrencyCommand.Parameters.Add(nameParam)

InsertCurrencyCommand.CommandText = _

"INSERT SalesCurrency (CurrencyCode, Name) VALUES(@CurrencyCode, @Name)"

InsertCurrencyCommand.Connection = conn

'

conn.Open()

InsertCurrencyCommand.ExecuteNonQuery()

conn.Close()

End Using

End Sub

View 2 Replies View Related

An Error Has Occurred While Establishing A Connection To The Server. Error: 40

Dec 26, 2005

hi i got the following error message while connectiong to my sql server 2005

NB :i am connecting from the same pc where sq server is installed.

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) (Microsoft SQL Server, Error: 2)

Any idea?

Tarek

View 14 Replies View Related

Connecting To Sql Server 2000 On Godaddy Error: (provider: Named Pipes Provider, Error: 40 - Could Not Open A Connection To SQL Server)

Mar 5, 2007

Facts:1. I am using my account on Godaddy trying to connect to my sql server db.2. I can get into my db using user id and password.3. Godaddy's help file shows this for a connection string: connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE="
&db_name & ";UID=" & db_username & ";PWD=" &
db_userpassword4. My connection string: "Server=whsql-v09.prod.mesa1.secureserver.net;uid=dbasolutions;pwd=***;database=DB_87972;"  & _                    "Trusted_Connection=False providerName=System.Data.SqlClient"{password **** out}5. Get error message  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) I tried to email Godaddy's help desk with this information. There first response: We do not allow remote connections to our sql server database.There second response was to read the help file!Does anybody have any suggestions?  Thanks in advance,bswanson     

View 1 Replies View Related

Strange Constraint Error

Feb 2, 2007

I have a table called subscribers with the following fields
CustID  (identity)email  (text) fname  (text)lname  (text) - may be emptysubDate  (smalldate)Confirmed (boolean) - initially will be emptyConDate  (smalldate) - initially will be empty
I have a strongly typed dataset that contains only the one table. It has the method GetDataByIsSubscribed
SELECT     emailFROM         SubscribersWHERE     (email = @email)
And I have a function which calls it
Public Function ValSubscribe(ByVal vEmailAddr As String, ByVal vFName As String, ByVal vLName As String) As String    Dim SubscriptionAdapter As New EmailSubscriptionsTableAdapters.SubscribersTableAdapter    Dim dF As Data.DataTable = SubscriptionAdapter.GetDataByIsSubscribed(vEmailAddr)    If dF.Rows.Count > 0 Then        ValSubscribe = "This email address is already subscribed!"    Else        SubscriptionAdapter.InsertSubscriber(vEmailAddr, vFName, vLName, Now)        ValSubscribe = "success"    End IfEnd Function
This is an existing table that contains duplicate email addresses, but I don't want to add any more dups. 
You can see I have another method to add records, which works fine, though I've only tried to add email addresses that I know aren't in the table.  If I run the above code which first checks to see if an email address is in the table, and I use an email address that is, I get the following error
System.Data.ConstraintException was unhandled by user code  Message="Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."  Source="System.Data"  StackTrace:       at System.Data.DataTable.EnableConstraints()       at System.Data.DataTable.set_EnforceConstraints(Boolean value)       at System.Data.DataTable.EndLoadData()       at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)       at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)       at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)       at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)       at EmailSubscriptionsTableAdapters.SubscribersTableAdapter.GetDataByIsSubscribed(String email) in C:WINNTMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Fileswap48b4654224232ecApp_Code.ihd33v1_.4.vb:line 872       at Validate.ValSubscribe(String vEmailAddr, String vFName, String vLName) in C:Documents and SettingsAdministratorMy DocumentsVisual Studio 2005WebSitesWAPApp_CodeValidate.vb:line 90       at Validate.vCheckPage(String vEmailAddr, Int32 vLevel, String vFName, String vLName) in C:Documents and SettingsAdministratorMy DocumentsVisual Studio 2005WebSitesWAPApp_CodeValidate.vb:line 28       at advertise.Page_Load(Object sender, EventArgs e) in C:Documents and SettingsAdministratorMy DocumentsVisual Studio 2005WebSitesWAPform-advertise.aspx.vb:line 32       at System.Web.UI.Control.OnLoad(EventArgs e)       at System.Web.UI.Control.LoadRecursive()       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I think I understand what this error is telling my, but I don't get why.  All the fields except CustID allow nulls.  There are no foreign-keys, and I don't see where any fild by custID requires unique entries.  If I run the query in the designer, I don't have a problem. 
What am I missing?
Diane

View 11 Replies View Related

Strange Conversion Error

Nov 16, 2004

I have a function that retrieves a data set from a passed SQL string. I'm getting this weird error.


Input string was not in a correct format

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.FormatException: Input string was not in a correct format.

Source Error:


Line 205: sSQL = "Select * From LedgerDetails Where LedgerID = " & _LedgerID.ToString()
Line 206: msgbox(sSQL)
Line 207: TransactionDetails = GetDataSet(sSQL)
Line 208:
Line 209: _TransactionsIndex = CShort(Val(GetDataValue("Select Count() From LedgerDetails Where LedgerID = " & CStr(_LedgerID)))) -1


Source File: C:Documents and SettingsOwnerMy DocumentsUniversityFall 2004DSSASP WorkAlgorithmTest.aspx Line: 207

Stack Trace:

[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberFormatInfo NumberFormat) +184
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) +96

[InvalidCastException: Cast from string "Select * From LedgerDetails Wher" to type 'Integer' is not valid.]
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) +211


I have no idea why, but it seems to trying to convert the string into an integer. Both the argument and the parameter in the function are strings. I checked on the internet and the usual response is this is because the SQL is incomplete, but I have it showing me the compiled SQL string, and it is not imcomplete. I've tried hotwiring the query to match something I know will work, and I still get the same error. I've also tried compile the string using .ToString() on my number portion, storing the converted number into a string and only combining strings on the call, using another string variable as a temporary holder, using the String.Concat function, and even CStr. There is no way possible that this thing is an integer when the call is sent...

Any ideas?

Shawn

View 1 Replies View Related

Suddenly Getting STRANGE Error...

May 11, 2006

I've been building a simple test application and things have been working all day. Suddenly, about a half an hour ago - I started getting this error every time I attempt to go to the main web page:
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)
I have no idea what changed... Can someone help me figure this out please?
Thanks!~A~

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved