473,386 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Go Daddy SQL Server connection test string using VBA inside Excel

I'm trying to connect to Go Daddy's SQL Server database using the following test connection string inside Excel, but I keep getting 'Run-time error '-2147217843 (80040e4d)' Invalid connection string attribute.'

What is wrong with this VBA code?
Expand|Select|Wrap|Line Numbers
  1. Dim cnn As ADODB.Connection
  2. Dim canConnect As Boolean
  3.  
  4.  
  5. Public Sub TestConnection()
  6.  
  7. Set cnn = New ADODB.Connection
  8.  
  9. cnn.Open "Provider=sqloledb;Data Source=testdb.com;Initial Catalog=DBw; UserID=userID; Password='Password';"
  10.  
  11. If cnn.State = adStateOpen Then
  12.     canConnect = True
  13.     cnn.Close
  14. End If
  15.  
  16. MsgBox canConnect
  17.  
  18.  
  19. End Sub
  20.  
Any help would be appreciated. I've been searching online and looking for answers for some time now.
Mar 28 '10 #1
1 4298
yarbrough40
320 100+
your data source attribute is wrong and there is a space between User and ID for starters... GoDaddy will give you the correct string. Log into your account. go to SQL Server. then click the pencil icon in the 'Action' box on the right. Then in the toolbar click 'Configuration'

also it appears you have a lot of wrong syntax structure with your ADODB objects. you may want to google those

Enjoy!
Mar 31 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Kris Mattheus | last post by:
A little background: I've been using web services successfully for a while now. My web server is a Windows CE 4.2 device and my client is a windows C# application created with Visual Studio 2003....
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
0
by: kelvenng | last post by:
Hi all hope some one can help me solve my problem. Actually I want import data from excel to my MYSQL server by using VB6 I facing the problem on my coding and system show me the error. below is...
2
by: samadams_2006 | last post by:
Hello, I have a problem that I'm hoping someone will be able to help me resolve. 1) I have a C# Web Site in which I connect to the database: "Install Microsoft SQL Server 2005 Express...
4
by: eruth | last post by:
There are loads of post on this, but nothing that seems to cover my exact problem ;) I have an ASP.Net 1.1 web application running on my local machine. I want to connect to an SQL 2005 server...
2
by: kodart | last post by:
Introduction Performance is the main concern to most server application developers. That’s why many of them anticipate using .NET platform to develop high performance server application regardless...
1
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons:...
7
by: TG | last post by:
hi! I am trying to create a sql server table from an excel sheet. Here is the code I have: 'This procedure the xlsx file and dumps it to a table in SQL Server
0
by: tskmjk | last post by:
Hi all, I am developing an application which reads an excel file which has the following records and inserts into a table in SQL SERVER 2005 database . Data: Product ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.