Solved

Windows CE and dbnetlib.dll issue trying to connect to SQL Server

Posted on 2010-09-03
4
3,758 Views
Last Modified: 2013-12-27
Hi all,

I am working on an application that runs on a hand scanner running Windows CE.

I need to connect to an SQL server database on a network. I have all the code in place, but when I run the application and try to connect to the database, I get the following error:

System.MissingMethodException: Can't find PInvoke DLL 'dbnetlib.dll'.

I have added this file to the output project for the application but it makes no difference.

Any help is greatly appreciated.

Thanks.

resourcesys.
0
Comment
Question by:resourcesys
  • 2
  • 2
4 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 33597476
hmm, sounds like unknown beast to me - this dbnetlib.dll - and it sounds like desktop dll rather than for Windows CE.

could you please provide more info how does your application work? what does it do in terms of its flow?
0
 

Author Comment

by:resourcesys
ID: 33599080
Hi alexey_gusev,

The app contains a list of values to be displayed to the user from and SQL CE database hosted on the scanner.

That list can be updated by clicking a button, which will then connect to an SQL server database on a server, download records to a datatable, then loop through and insert those records into the SQL CE database.

When I click to update the list, I get the error.

Thanks.

resourcesys.
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 33599411
ok, how do you connect, could you please post any code?

here's some example (one of numerous :) ):

http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/f2523d0d-a062-4725-bc8c-7bb6470fc074

it's possible that sql ce isn't installed properly or anything else. you could debug your app and see exactly which statement generate an error
0
 

Accepted Solution

by:
resourcesys earned 0 total points
ID: 33602552
Hi alexey_gusev,

I have fixed the issue by installing the following .CAB file:

sql.phone.wce5.armv4i

It must have contained the missing .dll

Thanks for your assistance.

resourcesys.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project

840 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