Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2004, 04:22 AM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot open Sql Connection in Serviced component

Hi,
  I am trying to open a SQL Server connection in the Serviced component.(.Net)

  SqlConnection objConn = new SqlConnection (strConnectionString);
  objConn.Open();

I am using a remote database.

It generates an error when the open() method is encountered.
The exception thrown is HRESULT EXCEPTION.

I went through different sites and found that problem but no concrete solution has been provided.

I am stuck at this point.
My component is of type Library and not Server Application.

Is there any solution to get rid of this?

Regards
Pawan






Similar Threads
Thread Thread Starter Forum Replies Last Post
error 404 could not open a connection to sql serve sureshkumar1981 C# 2005 0 May 19th, 2006 11:48 PM
Could not open a connection to the Sql Server sureshkumar1981 ADO.NET 1 May 19th, 2006 03:59 AM
Open/Close SQL Connection within every method? flyin ADO.NET 8 May 18th, 2004 07:19 AM
Using Serviced DB object thermans BOOK: ASP.NET Website Programming Problem-Design-Solution 0 March 8th, 2004 01:50 PM
InvalidCastException in Serviced Component schockp VS.NET 2002/2003 1 September 3rd, 2003 02:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.