.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Downcast OLE DB connections

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :Sql Server


I have a dataflow with a Script component and I need to use one of the connection managers I configured which is an OLE DB connection manager. I use AcquireConnection, but when I try to downcast it to an OleDbConnection object, I get an exception that COM objects can't be cast to non-COM objects. How can I solve this issue?


View Complete Post

More Related Resource Links

Basic Instincts: Introducing ASP.NET Web Part Connections


When you begin to work with the Microsoft® . NET Framework 2. 0 and ASP. NET, you discover that the new Web Parts infrastructure adds some very powerful functionality to the underlying platform. In the September 2005 issue of MSDN®Magazine, Fritz Onion and I have an article on programming Web Parts titled "ASP.

Ted Pattison

MSDN Magazine February 2006

Mulitiple Connections to Excel Sheet


I have a spreadsheet that I want to link to Sharepoint as a list.  I want to use Sharepoint to make updates to the spreadsheet as well as for lookups in other lists.

My problem is that the spreadsheet already has a data connection to a SQL database.  The spreadsheet doesn't update the DB directly but the DB connection is used to keep the spreadsheet updated with new data edited directly in the DB.  I don't own the DB or the spreadsheet so cannot convince them to do their editing another way (directly from the info in the spreadsheet for example) so ...I HAVE to keep the existing connection to the DB. 

My question is...is it possible to keep the connection to the DB AND link to Sharepoint?

OR..is there another solution? 

wss2.0 Infopath 2007 'This form requires connections to data sources when it is loaded. At least on


Hi all

I have a user who receives the error 'This form requires connections to data sources when it is loaded. At least one of these connections is not available. As specified by the form designer, this form will not open' when trying to Submit an infopath form located on a WSS2.0 site.

The user has been having this issue since upgrading to Office 2007 and IE7. I have had the user run an Office Diagnostics but this has not resolved the issue.

I am not aware of any other users experiencing this issue.

Any ideas please?

Cannot timeout connections when a network outage occurs

Hi, We are running SQL Server 2008 in a mirrored configuration.  Client access is performed using the Microsoft JDBC 2.0 driver, configured to failover to the Mirror in the event the Primary database is unavailable.  Additionally, the client maintains a database connection pool using Apache DBCP's BasicDataSource.  During testing, we have found that the failover works flawlessly if either the primary Database is taken offline or the primary SQL Server service is stopped - attempts to use existing pooled connections to the primary database fail immediately and new connections are created to the mirror database. However, when simulating a network failure (by disabling the network interface on the SQL Server machine) things aren't so nice.  The client first attempts to use an existing pooled connection to the primary database.  At this point the client hangs for up to 15 minutes before failing with the following error: Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection timed out         at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)         at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1355)         at com.microsoft.sqlserver.jdbc.TDSChannel.r

Server 2008 R2 Express accepts only local connections?

My question SQL Server 2008 R2 Express accepts only local connections? [closed] was closed unanswered and my account (with the same username/nick vgv8) was banned in 1 min without any warning and notification from all StackExchange sites (StackOverFlow.com, ServerFault.com, SuperUser.com). I could not understand can MS SQL Server 2008 R2 Express  accept remote connections? And what are local connections - in the same subnetwork, AD, workgroup, the same machine? 

DVWP connections with multi-select lookup columns

I have a question concerning the Data View Web Part using SharePoint Designer 2007.   I have two list (A and B). List A has a lookup column (called B-items) with multiple selections to items in List B(using the Title column from B).   I create a web part page and insert a data view of using List A. I create another data view with data from List B. Next, I make a Web Part Connection between the two data views with A passing B-items column as parameter to List B data view. I then create a filter on the List B data view with a comparison of List B’s Title column equal to the parameter of List A’s B-items value when a user selects an item from List A data view. The problem is nothing appears in List B’s data view.   When I try the reverse of the above scenario it works fine.     I understand that this is properly functionality, but is there a way to achieve my first scenario? If so, how can it be accomplished?   I have looked through the web for help and found the answer here http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/749b7477-f37f-4724-94b3-b6ace770e73a seems to be what I’m looking for. However, I am unsure how to implement his code into the web part page.   I am a worse than a novice with xsl so if anyone gives an example I would greatly appreciate step by step on what code is needed a

Close all existing connections

I have written code to manage the partitions in a database. I see that this code gets deadlocked often because of some open connections.   Is there someway to close all existing connections?   I know of one approach which is to alter the database to a single user mode. ... but wanted to know if there is something more light weight.    

Infopath Data Connections and Submit

We are in the process of shifting our draft system from SP 2007 to SP 2010 and we are re-visiting our Infopath forms service. Admin approved IP forms,  the templates emailed to our 12 remote 'offices' 12 Site collections -identical structure for remote locations 12 Remote user locations, never connected! ,fills in the form, selects own site, and emails back to office Custom button on form with rules reads 'selected site' and uses appropiate data connection to submit to correct Site Collection/Form Library. We are only using 1 site at the moment but obviously with 12 sites it becomes unmanagable, my thoughts;- Can we use a web service to act as an intermediary to point to correct library? Would a dataconnection library help?, or is the amount of work the same? ??? casey  

How to develop a custom (media) webpart which supports webpart connections (as consumer)?

We have a list of youtube links and we want to enable user to click a list item and watch the moview in another webpart, but i didn't find a webpart which supports that (the page viewer seems suitable to display moview but does'nt support connections). So we are thinking of develop the consumenr webpart that display the moview by the parameter it gets from the list. Can you help? thanks

Why SQL accepts both encrypted connection and non-encrypted connections when force encryption option

I have installed a certificate and have set force encryption to yes under the flags' tab of protocols' window as well as SQLnative client configuration properties but SQL Server accepts both encrypted connection and non-encrypted connections,why?(i have checked the encrypt connection of the connection properties of connect to server window). also when i run profiler, it can capture both T-SQL statements which has run against encrypted and non-encrypted connection and i expect the profiler should not be able to get the encrypted connection's T-SQL statement,am I right or something is wrong with my  configurations?--yousef

The number of connections to this computer is limited

I am currently getting an error saying ' The number of connevtions to this computer is limited and all the connections are in use.'. When I first looked this error up it says it comes with SQL server default allowing no connections. I d/l'd SQL but never really used it, maybe just opened it a couple of times but that was it. I just uninstalled all SQL applications on my computer. I have restarted and no traces that I can find left from SQL, however I am still getting the same error. Maybe uninstalling SQL didn't change this setting back to the original, or maybe something else is going on. I was hoping to get some help/advice. Please let me know what you would suggest I do. My understanding if you d/l use SQl server the default connections is zero. Windows Vista may allow 5 SQL server default is zero. So if you d/l SQL you would have to change the default connections to something else. I never did that after opening SQL server and some of its other tools. Today I uninstalled SQL after getting this error hoping the default value would change back to Vistas connection default. It did not change so, I am still getting this error.   http://support.microsoft.com/kb/320728 But I no longer have SQL

Connections to SQL Server Files (*.mdf) require SQL Server Express 2005

When ever I click on an MDF file in VS2005 I get the following message.Required Components Missing.Connections to SQL Server Files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URl: http:go.microsoft.com/fwlink/?linkID=49251.I think this may have been due to the install order and options I selected.1. VS2005 Pro, without SQL Server Express 2005 as I was planning to install SQL2005 Developer.2. SQL2005 Developer.I then noticed the above problem and installed SQL Server Express 2005 from the VS Pro DVD.  I still have the problem.  Any ideas how I can fix this ?

Is TCP/IP the only protocol for remote connections?

By default Express Ed.  has Shared Memory - enabled (Named Pipes , TCP/IP , VIA) - disabled. It is also written that Express Ed. has remote connections disabled by default. Should I understand from this that "Shared Memory" cannot be used for remote connections? and any of (Named Pipes , TCP/IP , VIA) can be used for remote connection? Why does [1] tells about enabling TCP/IP as the only way of enabling remote connections?  [1] http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/  

Configure Synchronization connections with PowerShell (User Profile)

Hi, I was checking the Pshell cmdlets for SPS2010 and wasn't able to configure the sync connection after creating the User Profile SA. Do you know if it's possible to configure this part (AD, filters, etc) in PShell ? Is it done using the "SetupSynchronizationService" method of the User Profile Service Application object ? Thanks ! Wes  

"The Windows Security layer always falls back to NTLM when connections are made locally"

Using Kerberos with SQL Server tells (in Comments): "Il-Sung Lee 27 Nov 2006 4:12 PM The Windows Security layer always falls back to NTLM when connections are made locally.  This appears to be the design of SSPI when NEGOTIATE is used so what you are seeing is expected" And how to avoid "NEGOTIATE"? I am curious about 2 aspects: 1) Why BEGOTIATE is used for local connections? What os the point in it for internal connections? 2) Does it mean that I cannot force/trick into using  Kerberos developing against local SQL Sever?

InfoPath 2010, Multiple Repeating Sections have same name, Diff data connections using same SQL Serv

I've created an InfoPath 2010 form that has three Repeating sections and each one uses a different data connection but all three connections use the same table in SQL Server... "Accounts".  Now you might ask why I would do this? Well I need different sets of data in each section and it all resides in the same table in the repository. Also, sometimes one section will not have information and I do not want a bunch of blank fields displaying in the repeating section. So I split the data into separate sections. Now here is the challenge for you guru's out there. :) I want to use one column in the 3rd repeating section  to refer back to another column in the first repeating section.(for referential integrity) Unfortunately since they both use the same table in the database they possess the same name under advanced view:  myFields/dataFields "d_:Accounts". In fact all three of my repeating sections have the same name based upon the database table used in the data connection. In the SQL statement I attempted to rename each of the connections via the statement. I have not tried to give the table an alias in the statement yet. Will try that one next. 1. Is there a simple way to rename the repeating Section from "d_:Accounts" to something else so that  they are each unique? (Without using backend code as I've only used InfoPath/SP/S
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend