Solved

Excel Add-in VB.net Problem connecting to SQL

Posted on 2013-11-28
3
290 Views
Last Modified: 2013-12-02
Hi. I am getting the error trying to connect to a SQL database from my VB.net Excel add-in.
This error hasn't come up in two years and has suddenly arisen after I installed Office 2013 alongside  my existing Office 2007. The error happens at the fourth line of the following code:


            Dim cn As New SqlConnection(oConnectionString)

            Dim adp As New SqlDataAdapter(SQLExpression, cn)

            Dim ds As New DataSet

            adp.Fill(ds, "SystemData") 'Error at this line

1
0
Comment
Question by:murbro
  • 2
3 Comments
 
LVL 9

Expert Comment

by:Valliappan AN
Comment Utility
Is the TCP/IP protocol enabled in your SQL Server?

Check this link: http://sqlanddotnetdevelopment.blogspot.in/2013/07/a-connection-was-successfully.html

Hope that helps.
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 500 total points
Comment Utility
Also check this link:

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_23725734.html

You may need to set priorities, or Named Pipes.
0
 

Author Closing Comment

by:murbro
Comment Utility
Thanks for your help
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now