Solved

Excel Add-in VB.net Problem connecting to SQL

Posted on 2013-11-28
3
301 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
ID: 39683635
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
ID: 39683637
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
ID: 39689661
Thanks for your help
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 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