Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-09-03
4
Medium Priority
?
4,109 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

824 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