[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ODBC ----Connection to 'MyServer' failed

Posted on 2012-08-30
2
Medium Priority
?
1,031 Views
Last Modified: 2012-08-31
Hi
I have created a DSN Connection
and Through MS Access linked SQL table successfully.
Directly i can access using my username and password.
But through my VB Code, Getting RunTime Error..
"ODBC ----Connection to 'MyServer' failed"

and highlighted on following line.

  Set rs = Con.Execute("SELECT * FROM [ODBC;DSN=MyServer;uid=*******;pwd=*******;database=CustRecDtl].DBO_Cust_Dtl")
0
Comment
Question by:crystal_Tech
2 Comments
 
LVL 4

Accepted Solution

by:
NetExpert_pl earned 2000 total points
ID: 38353303
Con = New Odbc.OdbcConnection("DSN=MyServer")
rs = New Odbc.OdbcDataAdapter("SELECT * FROM DBO_Cust_Dtl;", Con)
0
 
LVL 1

Author Comment

by:crystal_Tech
ID: 38354002
ok what i did is.. removed DSN and recreated .. and problem solved..

thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

867 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