开发者

Have you ever had this error?

开发者 https://www.devze.com 2022-12-14 03:46 出处:网络
microsoft visual stu开发者_如何学编程dio opens my table using dataset designer but i cannot open my table using the same connectionstring.

microsoft visual stu开发者_如何学编程dio 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


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.


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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消