2
votes

microsoft visual studio opens my table using dataset designer
but i cannot open my table using the same connectionstring.
my database is DBase IV.
and this is the connectionstring

Driver={Microsoft dBASE Driver (*.dbf)};collatingsequence=ASCII;dbq=d:\Data\88;deleted=0;driverid=277;fil=dBase IV;maxbuffersize=2048;maxscanrows=8;pagetimeout=600;safetransactions=0;statistics=0;threads=3;uid=admin;usercommitsync=Yes

it is made by visual studio itself.
and this is my code

DataSet1TableAdapters.AN10TableAdapter _AN10TableAdapter = new DataSet1TableAdapters.AN10TableAdapter();  
_AN10TableAdapter.Fill(D_Data.AN10);  

and this is the error

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

this real joke is killing me.
platform:vista x64
language:c#.net
.netframework vesion:3.5
worked on it:10 days

2
@unforgiven3 why did you downrate me? you want a picture of that? - Behrooz
where do you select the database name? is that implied by the dbq? and you never use the option data source I think this is what the error is saying - Earlz
I didn't downvote you, I edited your question's title to make more sense. Don't assume the editor always is the downvoter. - Rob

2 Answers

3
votes

I guess the issue is the 64-bitness of your machine. The driver is an unmanaged component and you probably have a single version of it (32-bit or 64-bit) installed on your machine. Since you cannot load 32-bit unmanaged components in a 64 bit process (and vice versa), it'll not work. Switch the target CPU setting of your project to x64 and x86 to force the assembly to run with the appropriate bitness and retry. It's likely to solve your problem.

0
votes

Do you have the dBase data sources installed?

  1. Control Panel -> Administrative Tools -> Data Sources (ODBC)
  2. System DSN tab

(My OS is Windows XP but that's the idea.)