Previous Thread:   Length Semantics

5/11/2006 4:22:11 PM    ODBC Data source name not found and no default driver specified
Using VS 2003.NET  
  
Very basic project trying to get access to a Progress database via ODBC. I  
  
have the DSN configured properly and a test connection from the ODBC Data  
  
Source admin works just fine.  
  
I have also created a .udl DSN-less connection which works without error.  
  
However, when I drop an odbcConnection object onto my form and try to  
  
configure, I always get errors before I can even enter a connection  
  
string.  IOW, I click the drop-down arrow and immediately see the  
  
following message:  
  
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found  
  
and no default driver specified  
  
I have also tried the following:  
  
Dim odbcTestDW As New Odbc.OdbcConnection  
  
odbcTestDW.ConnectionString = "DRIVER={DataDirect 4.1 32-Bit Progress  
  
SQL92 v9.1D};HOST=myhost;PORT=6556;DB=dbname;UID=userid;PWD=password"  
  
odbcTestDW.ConnectionTimeout = 15  
  
odbcTestDW.Open()  
  
results in the same error message.  
  
Also tried using the DSN connection as  
  
odbcTestDW.ConnectionString =  
  
"DSN=testdsn;HOST=myhost;PORT=6556;DB=dbname;UID=userid;PWD=password"  
  
odbcTestDW.ConnectionTimeout = 15  
  
odbcTestDW.Open()  
  
Once again, same error message.  Oddly enough, at one point before this  
  
all went completely wrong, I had it working within Visual Studio with and  
  
odbcDataAdapter.  I configured a SELECT statement and could choose  
  
"Preview Data" and see that it was working.  However, when I compiled and  
  
ran the VS project, it gave the above-mentioned error at run-time.  
  
So, I removed all the ODBC objects from the project and tried starting  
  
over, now I can't even configure a connection string.  
  
Mind boggling.  
  
Thanks for any help you can provide,  
  
- Tris



5/12/2006 2:03:18 AM    RE: ODBC Data source name not found and no default driver specified
Hi Tris,  
  
This might be a known issue. And I suggest you try the following steps for  
  
solution.  
  
1. In the main menu, select View/Server Explorer.  
  
2. In the Server Explorer, remove all the database connections under Data  
  
Connections node.  
  
Or here is another option.  
  
1. Exit VS.NET.  
  
2. Delete the file DefaultView.SEView under C:\Documents and Settings\<user  
  
name>\Application Data\Microsoft\VisualStudio\8.0\ServerExplorer  
  
3. Restart VS.NET IDE and it might be working fine.  
  
HTH.  
  
Kevin Yu  
  
Microsoft Online Community Support  
  
============================================================================  
  
==========================  
  
When responding to posts, please "Reply to Group" via your newsreader so  
  
that others may learn and benefit from your issue.  
  
============================================================================  
  
==========================  
  
(This posting is provided "AS IS", with no warranties, and confers no  
  
rights.)

5/12/2006 9:58:02 AM    Re: ODBC Data source name not found and no default driver specified
Thank you, removing DefaultView.SEView did the trick.  
  
Except, since I'm using VS 2003, the folder name is  
  
C:\Documents and Settings\<username>\Application  
  
Data\Microsoft\VisualStudio\7.1\ServerExplorer  
  
However, now I'm back to where I was before. It works at design time, but  
  
not at run time.  
  
In VS, I can right-click over my odbcDataAdapter object and select  
  
"Preview Data" to see that my select statement works as expected and  
  
returns the rows & columns of data that I want to see.  
  
However, at run time, I always get  
  
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found  
  
and no default driver specified  
  
At the point where the code executes:  
  
OdbcConnection1.Open()  
  
Why does this work at design-time, but not at run-time?  
  
The connection string is as follows:  
  
DSN=testdw;PORT=6556;UID=userid;HOST=hostname;PWD=userpwd;DB=dbname  
  
Thanks in advance,  
  
- Tris  
  
Kevin Yu [MSFT] wrote:

5/12/2006 12:12:29 PM    Re: ODBC Data source name not found and no default driver specified
Alright, here's something interesting.  
  
I built a little test project in Visual Studio 2005, wrote the exact same  
  
code as I'm using in VS 2003.NET and it works just fine at run time.  
  
So, the question now becomes: Why doesn't VS 2003.NET work?  
  
Or, is there some sort of patch for ODBC objects in VS 2003 that will  
  
allow this to work?  
  
Is it the framework?  VS 2003 uses v1.1 while 2005 uses 2.0.  
  
And no, writing the app in VS 2005 is not an option.  I am creating  
  
additional modules  for an application that was created in VS 2003 and I  
  
must continue to use it.  
  
Thanks,  
  
- Tris  
  
Tris wrote:

5/15/2006 8:01:06 AM    Re: ODBC Data source name not found and no default driver specified
Client side is Windows XP SP2.  
  
Database backend is Progress v9.1D (patch 08) running on HP-UX 11.  
  
ODBC driver is DataDirect v4.1 32-bit for Progress SQL92 v9.1D.  
  
Thank you,  
  
- Tris  
  
Kevin Yu [MSFT] wrote:

5/15/2006 8:05:02 AM    Re: ODBC Data source name not found and no default driver specified
Hi Tris,  
  
Could you let me know, what OS and database are your working on?  
  
Kevin Yu  
  
Microsoft Online Community Support  
  
============================================================================  
  
==========================  
  
When responding to posts, please "Reply to Group" via your newsreader so  
  
that others may learn and benefit from your issue.  
  
============================================================================  
  
==========================  
  
(This posting is provided "AS IS", with no warranties, and confers no  
  
rights.)

5/16/2006 5:24:29 AM    Re: ODBC Data source name not found and no default driver specified
Hi Tris,  
  
Sorry, but I don't have the environment to test this issue. Could you  
  
contact Microsoft PSS for this issue? Here is the contact information.  
  
http://support.microsoft.com/default.aspx?scid=fh;EN-US;OfferProPhone  
  
Kevin Yu  
  
Microsoft Online Community Support  
  
============================================================================  
  
==========================  
  
When responding to posts, please "Reply to Group" via your newsreader so  
  
that others may learn and benefit from your issue.  
  
============================================================================  
  
==========================  
  
(This posting is provided "AS IS", with no warranties, and confers no  
  
rights.)